Posted by & filed under GIT.

$ git clone git:// ~/nvm
Initialized empty Git repository in /home/thunter/nvm/.git/[0:]: errno=Connection timed out
fatal: unable to connect a socket (Connection timed out)

If you are getting this error, it could be that you are behind some sort of corporate firewalls blocking the git protocol. To get around this, you can update the URI by changing git to http:

$ git clone ~/nvm
Initialized empty Git repository in /home/thunter/nvm/.git/
remote: Counting objects: 356, done.
remote: Compressing objects: 100% (205/205), done.
remote: Total 356 (delta 190), reused 299 (delta 143)
Receiving objects: 100% (356/356), 49.80 KiB, done.
Resolving deltas: 100% (190/190), done.

If you need to update your submodules, you’ll want to edit your .gitsubmodules and make the same changes.

Thomas Hunter II

Support Thomas on Patreon. Thomas is the author of Advanced Microservices and a prolific public speaker with a passion for reducing complex problems into simple language and diagrams. His career includes working at Fortune 50's in the Midwest, co-founding a successful startup, and everything in between.