You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Join now to unlock these features and more
I'm trying to push several files to a repository over SSH (PuTTY/plink). When I do this, the push fails with the following output:
git -c diff.mnemonicprefix=false -c core.quotepath=false push -v --set-upstream origin refactoring:feature/<repo_name>
Pushing to ssh://<bitbucket_server_name>:7999/xxx/xxx_xxx_xxx.git
The host key is not cached for this server:
<bitbucket_server_name> (port 7999)
You have no guarantee that the server is the computer
you think it is.
The server's rsa2 key fingerprint is:
ssh-rsa 2048 SHA256:am2ymdBXeGm6NjLuVDHN6pI8WsIvrIkoSeFm6Q4KZc0
If you trust this host, enter "y" to add the key to
Completed with errors, see above.
PuTTY's cache and carry on connecting.
If you want to carry on connecting just once, without
adding the key to the cache, enter "n".
If you do not trust this host, press Return to abandon the
Store key in cache? (y/n, Return cancels connection, i for more info) fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
I've tried using Embedded Git and plink'ing to bitbucket.org as stated in https://confluence.atlassian.com/sourcetreekb/trust-a-server-s-host-key-when-no-button-is-available-to-trust-it-788731545.html, but neither work (I'm already using Embedded Git; no popup appears)
I've also tried manually plink'ing to the repository, but I get the following error:
FATAL ERROR: Network error: Connection refused
How can I fix this?
Turns out the solution is to install PuTTY and connect through that so the option to trust the host appears.
Then recreate the public and private keys via PuTTYgen , add the public key to my Bitbucket account on the server, then add the private key to Pageant, as per the steps in this answer: