Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

problem with ssh authentication

pcrooker
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 7, 2022

 

I recently joined Jira to my primary bitbucket repository. I now find my ssh keys for
the 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 be
exactly like the previous question: "Repository access is forbidden, but the SSH key
authentication 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 the
unauthorized response. I am admin for the repository:

debug1: Next authentication method: publickey
debug1: Offering public key: /home/pcrooker/.ssh/id_ecdsa ECDSA SHA256:Vq3W6YpyH6B7lLHjiNFKcNxed4nGlKemO+MLz9Ng/O4 explicit agent
debug1: Server accepts key: /home/pcrooker/.ssh/id_ecdsa ECDSA SHA256:Vq3W6YpyH6B7lLHjiNFKcNxed4nGlKemO+MLz9Ng/O4 explicit agent
debug1: Authentication succeeded (publickey).
Authenticated to bitbucket.org ([104.192.141.1]:22).
debug1: channel 0: new [client-session]
debug1: Entering interactive session.

/snip

debug1: Sending command: git-receive-pack 'pcrooker/wikibotanica.git'
debug1: client_input_channel_req: channel 0 rtype exit-status reply 0
Unauthorized

I have been regularly pushing updates regularly until this happened. I'm stuck - can
anyone help?

 

thanks, Phil

 

 

1 answer

1 accepted

0 votes
Answer accepted
Mark C
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 9, 2022

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

pcrooker
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 9, 2022

Thanks, Mark, yes that is it. I got mixed up between the two locations. Thanks again for the help.

Like Mark C likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events