Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GitHub SSH connection error #3060

Closed
ilkkao opened this issue Apr 7, 2017 · 2 comments
Closed

GitHub SSH connection error #3060

ilkkao opened this issue Apr 7, 2017 · 2 comments

Comments

@ilkkao
Copy link

ilkkao commented Apr 7, 2017

Do you want to request a feature or report a bug?
bug

What is the current behavior?
In a fast network, several GitHub SSH git URLs in package.json causes a SSH connection error.

If the current behavior is a bug, please provide the steps to reproduce.

[Fast internet connection needed]

  1. Use package.json
{
  "name": "yarn-test",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "dependencies": {
    "carrier": "git+ssh://[email protected]/pgte/carrier.git#v0.3.0",
    "colors": "git+ssh://[email protected]/Marak/colors.js.git#v1.1.2",
    "cron": "git+ssh://[email protected]/kelektiv/node-cron.git#v1.2.1",
    "css-loader": "git+ssh://[email protected]/webpack-contrib/css-loader.git#v0.27.0",
    "file-loader": "git+ssh://[email protected]/webpack-contrib/file-loader.git#v0.11.1",
    "ip": "git+ssh://[email protected]/indutny/node-ip.git#v1.1.5",
    "jquery": "git+ssh://[email protected]/jquery/jquery.git#3.2.1",
    "js-cookie": "git+ssh://[email protected]/js-cookie/js-cookie.git#v2.1.4",
    "jwt-simple": "git+ssh://[email protected]/hokaccha/node-jwt-simple.git#v0.5.1",
    "koa": "git+ssh://[email protected]/koajs/koa.git#2.2.0",
    "koa-body": "git+ssh://[email protected]/dlau/koa-body.git#2.0",
    "koa-compress": "git+ssh://[email protected]/koajs/compress.git#2.0.0",
    "koa-error": "git+ssh://[email protected]/koajs/error.git#3.0.0",
    "koa-logger": "git+ssh://[email protected]/koajs/logger.git#2.0.0",
    "koa-proxy": "git+ssh://[email protected]/popomore/koa-proxy.git#0.8.0",
    "koa-router": "git+ssh://[email protected]/alexmingoia/koa-router.git#v7.0.1",
    "minimist": "git+ssh://[email protected]/substack/minimist.git#1.2.0",
    "mkdirp": "git+ssh://[email protected]/substack/node-mkdirp.git#0.5.1",
    "uid2": "git+ssh://[email protected]/coreh/uid2.git#0.0.3",
    "url-loader": "git+ssh://[email protected]/webpack-contrib/url-loader.git#v0.5.8"
  }
}
$ ./yarn --network-concurrency 2
[...]
error Command failed.
Exit code: 128
Command: git
Arguments: ls-remote --tags --heads ssh://[email protected]/indutny/node-ip.git
Directory: /Users/ioksanen/tmp/yarn-bug
Output:
ssh_exchange_identification: read: Connection reset by peer
fatal: Could not read from remote repository.
$ ./yarn --version 
0.23.0-20170406.1050

What is the expected behavior?

Succesful Yarn install

In the real use case the links point to private GitHub repositories. The problem is related to #1307. It looks like GitHub has a limit for parallel git operations. I tried to ask them what the actual limit is but have not received an answer.

@ilkkao
Copy link
Author

ilkkao commented Apr 7, 2017

I added some debug console.logs

./yarn --network-concurrency 2                                                                                        master!?
yarn install v0.23.0-20170406.1050
info No lockfile found.
[1/4] 🔍  Resolving packages...
⠐ url-loader@git+ssh://[email protected]/webpack-contrib/url-loader.git#v0.5.8
ls-remote start
⠐ url-loader@git+ssh://[email protected]/webpack-contrib/url-loader.git#v0.5.8
ls-remote start
⠄ url-loader@git+ssh://[email protected]/webpack-contrib/url-loader.git#v0.5.8
ls-remote start
⠠ url-loader@git+ssh://[email protected]/webpack-contrib/url-loader.git#v0.5.8
ls-remote start
⠠ url-loader@git+ssh://[email protected]/webpack-contrib/url-loader.git#v0.5.8
ls-remote start
⠁ url-loader@git+ssh://[email protected]/webpack-contrib/url-loader.git#v0.5.8
ls-remote start
⠂ url-loader@git+ssh://[email protected]/webpack-contrib/url-loader.git#v0.5.8
ls-remote start
⠁ url-loader@git+ssh://[email protected]/webpack-contrib/url-loader.git#v0.5.8
ls-remote start
⢀ url-loader@git+ssh://[email protected]/webpack-contrib/url-loader.git#v0.5.8
ls-remote start
⠂ url-loader@git+ssh://[email protected]/webpack-contrib/url-loader.git#v0.5.8
ls-remote start
⠐ url-loader@git+ssh://[email protected]/webpack-contrib/url-loader.git#v0.5.8
ls-remote start
⢀ url-loader@git+ssh://[email protected]/webpack-contrib/url-loader.git#v0.5.8
ls-remote start
⠐ url-loader@git+ssh://[email protected]/webpack-contrib/url-loader.git#v0.5.8
ls-remote start
⠈ url-loader@git+ssh://[email protected]/webpack-contrib/url-loader.git#v0.5.8
ls-remote start
⠄ url-loader@git+ssh://[email protected]/webpack-contrib/url-loader.git#v0.5.8
ls-remote start
⡀ url-loader@git+ssh://[email protected]/webpack-contrib/url-loader.git#v0.5.8
ls-remote start
⠁ url-loader@git+ssh://[email protected]/webpack-contrib/url-loader.git#v0.5.8
ls-remote start
⠈ url-loader@git+ssh://[email protected]/webpack-contrib/url-loader.git#v0.5.8
ls-remote start
⠂ url-loader@git+ssh://[email protected]/webpack-contrib/url-loader.git#v0.5.8
ls-remote end
⡀ url-loader@git+ssh://[email protected]/webpack-contrib/url-loader.git#v0.5.8
ls-remote start
⠠ url-loader@git+ssh://[email protected]/webpack-contrib/url-loader.git#v0.5.8
ls-remote end
⢀ url-loader@git+ssh://[email protected]/webpack-contrib/url-loader.git#v0.5.8
ls-remote end
⡀ url-loader@git+ssh://[email protected]/webpack-contrib/url-loader.git#v0.5.8
ls-remote end
⠐ url-loader@git+ssh://[email protected]/webpack-contrib/url-loader.git#v0.5.8
ls-remote end
error Command failed.
Exit code: 128
Command: git
Arguments: ls-remote --tags --heads ssh://[email protected]/js-cookie/js-cookie.git
Directory: /Users/ioksanen/tmp/yarn-bug
Output:
ssh_exchange_identification: read: Connection reset by peer
fatal: Could not read from remote repository.

It looks like git ls-remote done in setRefRemote() is not under --network-concurrency rate limiting.

@BYK
Copy link
Member

BYK commented Sep 15, 2017

This seems to be fixed on latest master.

@BYK BYK closed this as completed Sep 15, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants