Heads up! On March 5, starting at 4:30 PM Central Time, our community will be undergoing scheduled maintenance for a few hours. During this time, you will find the site temporarily inaccessible. Thanks for your patience. Read more.

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

git ssh push with two factor auth

pcrooker October 26, 2024

Hi,

I setup 2FA on my account, now I can't push changes via git CLI using ssh, even though I have a ssh key setup in bitbucket. The error:

git@bitbucket.org: Permission denied (publickey)

 

The help page I found:

https://support.atlassian.com/bitbucket-cloud/docs/configure-ssh-and-two-step-verification/

mentions a 3rd party program but implied  that wasn't necessary if using an ssh key. What am I missing?

thanks, Phil

 

1 answer

1 vote
Ben
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 28, 2024

Hi @pcrooker 

That error message implies that your public SSH key configured locally does not match the public SSH key configured in your Personal Settings - it does not relate to 2FA.

I would suggest printing the public SSH key's stored in ~/.ssh/ and comparing them to the SSH key you've configured in Personal Settings > SSH Keys:

  • cat ~/.ssh/id_rsa.pub

If you still encounter issues, please let us know your timezone so we can raise a support ticket on your behalf - as we'll need to see verbose logs (which wouldn't be appropriate to share in a public forum such as community).

Cheers!

- Ben (Bitbucket Cloud Support)

 

pcrooker October 28, 2024

You're right. I've put in a new key and voila. I appear to have two accounts w the same name (I'll try to sort this out...), one in bitbucket and one in atlassian.com, so I had logged in the old bitbucket account which has an old ssl key. Thanks for the help.

Like Ben likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Product Admin Site Admin
TAGS
AUG Leaders

Atlassian Community Events