Buy Me a Coffee

[Yarn] Unable to connect to github.com

Today when I cloned a new project and ran yarn install, the below error popped up.

yarn install v1.22.17
[1/4] Resolving packages...
[2/4] Fetching packages...
error Command failed.
Exit code: 128
Command: git
Arguments: ls-remote --tags --heads git://github.com/WearyMonkey/ngtemplate-loader.git
Directory: /home/xxx/source/github.com/xxx/xxx/app
Output:
fatal: unable to connect to github.com:
github.com[0: 220.28.17.148]: errno=Connection timed out

The solution is to execute the below command under the cloned git repository.

git config --global url."https://".insteadOf git://

Enjoyed this article? Support my work with a coffee ☕ on Ko-fi.
Buy Me a Coffee at ko-fi.com
DigitalOcean Referral Badge
Sign up to get $200, 60-day account credit !