Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

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
atlassian, bitbucket, ci/cd workflows, scale ci cd, bitbucket webinar, devops pipeline, continuous integration, continuous delivery, atlassian learning, software automation, developer tools, build and deploy, pipeline optimization, atlassian community

Scale CI/CD workflows faster with Bitbucket Pipelines 🪣

Join this webinar on June 25/26th to learn how to build secure CI/CD workflows using Bitbucket Pipelines and get tips from our own engineers on how to speed up builds and operate at scale.

Register today
AUG Leaders

Atlassian Community Events