-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Fetching from GitHub raises a Connection reset by peer error #1307
Comments
Works correctly with Node v6.6, yarn v0.16.1, and Linux 4.6.7-1. I'm using git version 2.10.0, and What version of git are you using @albertfdp? |
It seems like upgrading to the last version of git (2.10.1) solves this issue and I can't reproduce it anymore. Thanks anyway! |
I'll reopen this issue as this is still a problem, although I have been able to identify the root cause: The problem is that using multiple concurrent ssh connections to GitHub from the same IP means that you are flagged as a possible DDoS and thus GitHub throws you with the I have consistently been able to reproduce this with the reproduction steps above while on my organization network, but it works when using a mobile network or my home network, since obviously those are slower connections that cannot handle so many concurrent requests and will prevent this issue. This is the reason why I mistakenly thought it was a git issue on the previous comment, as I was using then my home connection. Also, after you receive this error, you are flagged and during a period of time, I think it would be useful to be able to control the concurrency, especially because it's only an issue when you need to warm the cache, on later |
Do you want to request a feature or report a bug?
Bug
What is the current behavior?
When running
yarn
on package.json that contains many repositories pointing to GitHub, this will cause yarn to fail on the fetch step.If the current behavior is a bug, please provide the steps to reproduce.
I have created a example repository with a package.json that I can reproduce the error https://github.com/albertfdp/yarn-github-repos/blob/master/package.json.
On the fetch step, it raises an error like this (note, it's not always the same dependency that fails):
(in a different run):
The real use-case I have is for private GitHub repos, the repos in this example are public and I should use the npm registry, but it's only for helping to reproduce the bug.
What is the expected behavior?
That fetching packages from GitHub works just as with the
npm-cli
.Please mention your node.js, yarn and operating system version.
The text was updated successfully, but these errors were encountered: