2

I am trying to push a project (Calico) to GitHub, and am running into an error. I've successfully logged in via a ssh connection, and received the usual response:

Ryan@RYANLAPTOP-PC /C/inetpub/wwwroot/Calico (master)
$ ssh git@github.com
Enter passphrase for key '/c/Users/Ryan/.ssh/id_rsa':
Hi rossryan! You've successfully authenticated, but GitHub does not provide shel
l access.
Connection to github.com closed.

However, I am still receiving an error when I attempt to push the code:

Ryan@RYANLAPTOP-PC /C/inetpub/wwwroot/Calico (master)
$ git push -u github master
The server's host key is not cached in the registry. You
have no guarantee that the server is the computer you
think it is.
The server's rsa2 key fingerprint is:
ssh-rsa 2048 16:27:ac:a5:76:28:2d:36:63:1b:56:4d:eb:df:a6:48
Connection abandoned.
fatal: The remote end hung up unexpectedly

I believe I've followed the instructions rather faithfully from the website, substituting 'GitHub' for 'origin' in the right areas (origin is apparently already defined, so I used a different name). I've emailed GitHub about this problem, but have received no response.

Does anyone have any other ideas?

EDIT:

Output from git remote -v:

Ryan@RYANLAPTOP-PC /C/inetpub/wwwroot/Calico (master)
$ git remote -v
github  git@github.com:rossryan/Calico.git (fetch)
github  git@github.com:rossryan/Calico.git (push)
origin  C:/inetpub/wwwroot/Calico/ (fetch)
origin  C:/inetpub/wwwroot/Calico/ (push)
user978122
  • 5,531
  • 7
  • 33
  • 41

1 Answers1

1

git push origin master fails was about that error when using putty (instead of the packaged openssh included with msysgit). I don't think that is your case.

git - Server host key not cached is about that same error, and proposes to establish an ssh connection, which you did (and it didn't propose to add github to your $HOME/ssh/known_hosts file, so this isn't the issue either.

What you need to check is:

  • why are you pushing to github instead of the default name 'origin' (did you really add a remote (upstream) repo named 'github'?)
  • What exact address is behind the remote name 'github'. A right address for pushing would be (from GitHub man page on remote):
    • an ssh URL git@github.com:user/repo.git
    • or an https URL such like https://user@github.com/user/repo.git
Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • I believe I did add a repo called 'github.' More info included in an edit above. – user978122 Apr 15 '12 at 20:30
  • @user978122 wait, why is '`origin`' the address of your *local* repo? your remote `github` should be good though. I suppose `$HOME/ssh/known_hosts` does exists, right? – VonC Apr 15 '12 at 20:58