Forums

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

ssh -T hg@bitbucket.org says logged in but push to repository from Sourcetree says permission denied

Bryan Mauger January 3, 2019

ssh -T hg@bitbucket.org says logged in - You can use git or hg to connect to Bitbucket.

but when pushing to repository from Sourcetree error message says Permission denied (publickey)

Never had this problem before and I've been trying to remedy it for hours. I'm stumped!

3 answers

1 accepted

0 votes
Answer accepted
Bryan Mauger January 4, 2019

I needed to create a second ssh key since I'm using Bitbucket for both work and personal. Creating a second ssh key solved the problem.

Documentation:

https://confluence.atlassian.com/bitbucket/set-up-additional-ssh-keys-271943168.html

0 votes
Ana Retamal
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 3, 2019

Hi Bryan!

Have you checked that the credentials you have stored are correct? You can also check in the 'Accounts' section in Sourcetree if it's still using the right SSH key.

If everything seems to be fine and you're still getting that error, I'd recommend wiping Sourcetree preferences.

Let us know if that helped!

Ana

Bryan Mauger January 4, 2019

Thank you. It turned out that I needed to create an additional ssh key since I use one for my work account (this one to be use for personal items). Creating the additional key solved the problem.

Ana Retamal
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 7, 2019

Glad it's working now!

Have a good day,

Ana

Like Bryan Mauger likes this
0 votes
Rambabu Patina _Appfire_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 3, 2019

Hi @Bryan Mauger,

Please go through the knowledge article permission denied publickey and a similar question. Hope this helps you.

Thanks,
Ram.

Bryan Mauger January 4, 2019

Thank you. It turned out that I needed to create an additional ssh key since I use one for my work account (this one to be use for personal items). Creating the additional key solved the problem.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events