BitBucket: Authentication failed

2019-07-26 05:18发布

问题:

I followed this link: https://confluence.atlassian.com/bitbucket/add-an-ssh-key-to-an-account-302811853.html

I generated a public key and I pasted the file ~/.ssh/id_rsa.pub to SSH Keys in BitBucket.

However, I still get the error:

Host key verification failed. fatal: Could not read from remote repository.

Please make sure you have the correct access rights

回答1:

Host key verification failed. fatal: Could not read from remote repository.

This is not about client authentication, but server authenticity. You need to verify that the server you are connecting to is really the bitbucket. This is explained in this article.

The easiest way to resolve the problem is to paste the server public key below into the ~/.ssh/known_hosts:

bitbucket.org,104.192.143.1 ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAubiN81eDcafrgMeLzaFPsw2kNvEcqTKl/VqLat/MaB33pZy0y3rJZtnqwR2qOOvbwKZYKiEO1O6VqNEBxKvJJelCq0dTXWT5pbO2gDXC6h6QDXCaHo6pOHGPUy+YBaGQRGuSusMEASYiWunYN0vCAI8QaXnWMXNMdFP3jHAJH0eDsoiGnLPBlBp4TNm6rYI74nMzgz3B9IikW4WVK+dc8KZJZWYjAuORU3jc1c/NPskD2ASinf8v3xnfXeukU0sJ5N6m5E8VLjObPEO+mN2t/FZTMZLiFqPWc/ALSqnMnnhwrNi2rbfg/rd/IpL8Le3pSBne8+seeFVBoGqzHM9yXw==



标签: ssh bitbucket