I'm having a problem similar to the one in git - Server host key not cached, but there is a twist that is making the best solution there not work.
The twist is that I am trying to clone a repository from Stash, an application from Atlassian like git-hub that our company uses for storing its git repositories. After I enter my public key into Stash, I use Git Bash to try to clone a repository from there with the ssh address provided me by the system. This is what results:
$ git clone ssh://git@stash.mycompany.com:7999/teamproject/gitrepo.git
Cloning into 'gitrepo'...
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 xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:12
Connection abandoned.
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
Since I'm not using putty to try to connect, I tried the solution of connecting to the server with ssh:
$ ssh ssh://git@stash.mycompany.com:7999/teamproject/gitrepo.git
ssh: stash.mycompany.com:7999/teamproject/gitrepo.git: no address associated with name
If I tried shortening down the address that ssh can recognize, I get a different fingerprint than what git is rejecting:
$ ssh ssh://git@stash.mycompany.com
The authenticity of host 'stash.mycompany.com (10.XX.XXX.XX)' can't be established.
RSA key fingerprint is xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:34.
Are you sure you want to continue connecting (yes/no)? no
Host key verification failed.
I choose not to continue connecting because if I do connect, it just puts an entry that does not help git to do its job into my known_hosts file.
Anyone know how to get around this problem?