I recently joined Jira to my primary bitbucket repository. I now find my ssh keys forthe repository are missing. I added one, it authenticates as per the 'ssh -T git@bitbucket'test, yet I can't push any updates, I get an 'unauthorized' response.This appears to beexactly like the previous question: "Repository access is forbidden, but the SSH keyauthentication seems to succeed." I added the info to the ssh config file per the solution,but get the same result.Running ssh with -v I see that I am authenticated, yet I still get theunauthorized response. I am admin for the repository:
debug1: Next authentication method: publickeydebug1: Offering public key: /home/pcrooker/.ssh/id_ecdsa ECDSA SHA256:Vq3W6YpyH6B7lLHjiNFKcNxed4nGlKemO+MLz9Ng/O4 explicit agentdebug1: Server accepts key: /home/pcrooker/.ssh/id_ecdsa ECDSA SHA256:Vq3W6YpyH6B7lLHjiNFKcNxed4nGlKemO+MLz9Ng/O4 explicit agentdebug1: Authentication succeeded (publickey).Authenticated to bitbucket.org ([104.192.141.1]:22).debug1: channel 0: new [client-session]debug1: Entering interactive session./snipdebug1: Sending command: git-receive-pack 'pcrooker/wikibotanica.git'debug1: client_input_channel_req: channel 0 rtype exit-status reply 0Unauthorized
I have been regularly pushing updates regularly until this happened. I'm stuck - cananyone help?
thanks, Phil
Hi @pcrooker
Welcome to the community.
Based on the error message you've got which is "Repository access is forbidden", it seems you're pushing to a repository with an access key.Would it be possible for you to confirm if you're using an SSH key that is added under your Repository settings > Access keys?If yes, it is expected that you won't be able to push to the repository with the SSH key added as an access key because Access keys only grant read-only access to a public or private repository.Hence, you can't push using that SSH key.
If you'd like to be able to push using the SSH key, you'd need to add the SSH key under your Bitbucket Cloud account's level SSH key settings instead.You can check this documentation for more information: Set up an SSH key
Hope it helps and let me know how it goes.
Regards,Mark C
Thanks, Mark, yes that is it. I got mixed up between the two locations. Thanks again for the help.
It looks like you're new here. Sign in or register to get started.