git commands for private URL not working
Reported by darxriggs | July 13th, 2008 @ 10:37 PM
I created a new github account today and a new rsa-key pair. The public key authentication seems to work - checked it via "ssh github.com -v". It shows "debug1: Authentication succeeded (publickey)." but I guess because of no real ssh login in the end also "I can't do that, darxriggs."
Anyway when I run git commands like "git clone github.com:darxriggs/railscollab.git"
or "git pull ...", "git push ..." I only get the error "What?
fatal: The remote end hung up unexpectedly"
If I do a "git clone git://github.com/darxriggs/railscollab.git" that's working fine.
I am running Kubuntu 8.04 and my ~/.ssh/config file looks like this:
Host github.com
User git
Hostname github.com
Port 22
IdentitiesOnly yes
IdentityFile ~/.ssh/id_rsa
TCPKeepAlive yes
Comments and changes to this ticket
-
Tom Preston-Werner July 14th, 2008 @ 01:40 AM
- → Assigned user changed from to Tom Preston-Werner
- → State changed from new to open
Try putting "git@" in front of the url like so:
git clone git@github.com:darxriggs/railscollab.git
-

darxriggs July 14th, 2008 @ 07:35 PM
Sorry for this small mistake. I am already using the URL you mentioned. That one is not working. Running the clone command gives the following output:
Initialized empty Git repository in /home/darxriggs/workspace/railscollab/.git/
What?
fatal: The remote end hung up unexpectedly
fetch-pack from 'git@github.com:darxriggs/railscollab.git' failed.
-
Tom Preston-Werner July 26th, 2008 @ 08:29 PM
- → State changed from open to waiting
What version of git are you using? It looks like your clone command is sending a request that we don't understand.
-

darxriggs August 12th, 2008 @ 04:10 PM
I tried nearly everything but don't get it to work. My git version is 1.5.4.3.
What I have encountered further is that the public cloning URL is working for me - see: git clone git://github.com/darxriggs/railscollab.git Initialized empty Git repository in /home/darxriggs/workspace/railscollab/.git/ remote: Counting objects: 3641, done. remote: Compressing objects: 100% (1058/1058), done. remote: Total 3641 (delta 2435), reused 3641 (delta 2435) Receiving objects: 100% (3641/3641), 867.55 KiB | 60 KiB/s, done. Resolving deltas: 100% (2435/2435), done.
But my private clone URL (for the forked repository) does not work (I also tried with a 2nd repository) - see: Initialized empty Git repository in /home/darxriggs/workspace/railscollab/.git/ What? fatal: The remote end hung up unexpectedly fetch-pack from 'git@github.com:darxriggs/railscollab.git' failed.
Just as additional information (even if "git clone" is not using these settings) - my .git/config contains the following entries: [core]
repositoryformatversion = 0 filemode = true bare = false logallrefupdates = true[remote "origin"]
url = git@github.com:darxriggs/railscollab.git fetch = +refs/heads/*:refs/remotes/origin/* push = refs/heads/master:refs/heads/masterMaybe there is still something wrong the authentication? Maybe not because when I intentionally invalidate my public key on github and try to connect I get another error - see: git clone git@github.com:darxriggs/railscollab.git Initialized empty Git repository in /home/darxriggs/workspace/railscollab/.git/ Permission denied (publickey). fatal: The remote end hung up unexpectedly fetch-pack from 'git@github.com:darxriggs/railscollab.git' failed.
I have no idea what is wrong.
-

darxriggs August 12th, 2008 @ 05:35 PM
I did another thing - invalidating the URL (user and repository). So instead of:
git clone git@github.com:darxriggs/railscollab.git
...I did:
git clone git@github.com:darxriggs/xxx.git
or
git clone git@github.com:xxx/railscollab.git
...and got exactly the same error:
Initialized empty Git repository in .../home/darxriggs/workspace/railscollab/.git/ What? fatal: The remote end hung up unexpectedly fetch-pack from 'git@github.com:xxx/railscollab.git' failed.
-
Tom Preston-Werner August 19th, 2008 @ 09:48 PM
If I do this:
git clone git@github.com:xxx/railscollab.git
I get
Initialized empty Git repository in /Users/tom/dev/sandbox/railscollab/.git/ Repository not found. If you've just created it, please try again in a few seconds. fatal: The remote end hung up unexpectedly fetch-pack from 'git@github.com:xxx/railscollab.git' failed.
Your client seems to be sending a request that we don't recognize and so it never even gets to that point. Can you try upgrading your version of git just to make sure?
What OS are you on?
-

darxriggs August 20th, 2008 @ 09:37 PM
My big apology. :-(
I found out what the root of the problem. Long time ago I set the GIT_SSH environment variable for using a script of mine to get some other local git-repository working. So because of this git was not working properly with github.
The problem just showed up when using the private URL because then SSH kicked in else I guess it was using normal git or http protocol
You can therefore close this ticket.
Thanks for your help Tom.
-
Tom Preston-Werner August 20th, 2008 @ 10:07 PM
- → State changed from waiting to invalid
Glad you got it figured out!
Please Login or create a free account to add a new comment.
You can update this ticket by sending an email to from your email client. (help)
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
