Reputation: 7302
I'm having a problem when pushing to a bitbucket repository, I'm getting this message:
Pushing to ssh://[email protected]/banana/pera.git
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
Pushing to ssh://[email protected]/banana/pera.git
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
Pushing to ssh://[email protected]/banana/pera.git
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
Pushing to ssh://[email protected]/banana/pera.git
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
Reading some answers here and at Atlassian's forum I saw that to test if my key is OK I should use: ssh -T [email protected]
. I did and I'm getting Permission denied (publickey).
My problem now is to know which file it uses so I can give it the proper permissions. How do I do that? All the files under ~/.ssh/
have the 700 permission. I'm using a Macbook.
Thanks for any help
Upvotes: 0
Views: 1478
Reputation: 26545
Easiest is to use the ssh-agent
.
Use ssh-add
or ssh-add $privatekey
to add your key to the agent.
Use ssh-add -L
to print the public key and check that it is the same as the one on bitbucket.
Now try ssh
or git clone
and it should work.
Upvotes: 1