Answer the question
In order to leave comments, you need to log in
Accessing a repository on bitbucket via ssh?
I set up access to the turnip on bitbucket from the local machine via ssh, everything is fine. Now I want to deploy to a production server. I created a new key on the server, added a new key to bitbucket, copied key.pub there. I do git clone [email protected]:st_c/name.git and get
[email protected]: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
Answer the question
In order to leave comments, you need to log in
https://superuser.com/a/232406/103089
Create file ~/.ssh/config
host bitbucket.org
IdentityFile ~/.ssh/cv-key
For those who get here and the higher solutions will not work.
RSA Algorithm Becomes Deprecated Bitbucket
's
recommendation to use a different algorithm or stub (requirement to use rsa).
As a result, in my config
Host bitbucket.org
HostName bitbucket.org
Port 22
HostKeyAlgorithms=+ssh-rsa
PubkeyAcceptedKeyTypes +ssh-rsa
IdentityFile ~/.ssh/id_rsa
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question