adams.co.tt

Problems cloning from github?

18th March 2010

When cloning from github, myself and others have been receiving the following error:

$ git clone http://github.com/rails/rails.git
Initialized empty Git repository in ./rails/.git/
got 41af6d9a78446a5219a321cf638945b1608cefd8
walk 41af6d9a78446a5219a321cf638945b1608cefd8
Getting alternates list for http://github.com/rails/rails.git
Getting pack list for http://github.com/rails/rails.git
Getting index for pack 1f58330b738a4c1046b0da9b07830f2d658e5169
got 95a5e284c6504e28802aa3a8168a8b7cc450a0e5
got fe2f383cf3c0aa6901487c398b9ae8ffce03ecbd
error: Unable to get pack index http://github.com/rails/rails.git/objects/pack/pack-1f58330b738a4c1046b0da9b07830f2d658e5169.idx

Getting index for pack fc8e2c8270c16a9a2d401f1f44ddd4e5eb3ec1ce
Getting index for pack afc0d5bc07e84621fd69897165322a40cb9179c2
Getting index for pack 0dc33522bcfc9731cb6b414e4665ec9acb74e0a4
error: Unable to find 5b3f7563ae1b4a7160fda7fe34240d40c5777dcd under http://github.com/rails/rails.git
Cannot obtain needed object 5b3f7563ae1b4a7160fda7fe34240d40c5777dcd
while processing commit 41af6d9a78446a5219a321cf638945b1608cefd8.
fatal: Fetch failed.

Turns out that github sometimes has problems with cloning over http. Using git as the protocol seems to be less error prone and much quicker:

$ git clone git://github.com/rails/rails.git

tags: git, github, post
blog comments powered by Disqus