All these while my SSH key have been working however today when i tried to git pull it was no longer working and gave me permission denied.
debug1: Authentications that can continue: publickey
debug1: Trying private key: /Users/chentzen02/.ssh/id_ed25519_sk
debug3: no such identity: /Users/chentzen02/.ssh/id_ed25519_sk: No such file or directory
debug1: Trying private key: /Users/chentzen02/.ssh/id_xmss
debug3: no such identity: /Users/chentzen02/.ssh/id_xmss: No such file or directory
debug1: Trying private key: /Users/chentzen02/.ssh/id_dsa
debug3: no such identity: /Users/chentzen02/.ssh/id_dsa: No such file or directory
debug2: we did not send a packet, disable method
debug1: No more authentication methods to try.
git@bitbucket.org: Permission denied (publickey).
Hi @CHEN TZEN KOK
Welcome to the Atlassian Community.
Could it be that you're ssh keys on your machine have been moved, deleted, or had their permission changed?
Looking at the error messages it seems that your git is not able to find any of your public ssh keys on your local machine.
Cheers,
Peter
Hi @CHEN TZEN KOK and welcome to the community!
If the SSH keys still exist in the ~/.ssh directory on your machine and nothing has changed with regards to their permissions, you can add the following to the ~/.ssh/config file on oyur machine
Host bitbucket.org
AddKeysToAgent yes
IdentityFile ~/.ssh/id_rsa
IdentitiesOnly yes
where id_rsa, replace with the name of the private key, whose public key you have uploaded to Bitbucket. This assumes that the SSH key pair exists in the ~/.ssh directory of your machine.
If there is no file named config in your ~/.ssh directory, you can create a new file with this name and add to it the content I shared above. This will ensure that this specific SSH key will be offered when you clone/pull/push to a Bitbucket Cloud repo via SSH.
Please feel free to let us know how it goes.
Kind regards,
Theodora
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.