Permission denied (publickey) - continues to be an issue Edited

Seems like I am adding a new thread to an existing problem, but none of the other answers, well, were the answer.

First - Sourcetree version 2.6.3 (134)  || Machine: Macbook pro (2017)  || OS: High Sierra 10.13.1

I have tried SSH and HTTPS on my mac and neither seems to solve this issue for very long. I have used OAuth with HTTPS on all my other machines and it works fine, but my mac is having issues session to session.

What I mean is that when it does work, it will only work for the session. Close bitbucket and reopen and I will get the error below. Then I start the process of adding an account all over again. Before it would work after going through this process, but it no longer works.

My account is the owner of the repo so permissions shouldn't be an issue, but even when using SSH keys it won't let me write, or even fetch the repo.

Here is the error

Pushing to git@bitbucket.org:finwitz/folder.git

Permission denied (publickey).

fatal: Could not read from remote repository.




Please make sure you have the correct access rights

and the repository exists.

Pushing to git@bitbucket.org:finwitz/folder.git

Permission denied (publickey).

fatal: Could not read from remote repository.

 

Any thoughts on what the issue could be? I am now assuming it is something local as everything else seems to connect until I make a change or pull from the repo.

1 answer

Hi Patrick, can you link the thread you're referring to so we can see what you've previously tried? 

The error you posted, is it happening when you use Sourcetree or when you use the terminal? If you haven't can you try the terminal and see if you get the same error? This will help us identify where is the problem coming from.

You can also run this command to see which key is your SSH agent offering when this problem happens:

ssh-add -L

There seems to be a known issue with MacOS Sierra not remembering SSH keys after rebooting that might be affecting you, you can see it at MacOs Sierra doesn't remember SSH keys between reboots.

Let us know!

Ana

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Aug 21, 2018 in Bitbucket

Branch Management with Bitbucket

As a project manager, I have discovered that different developers want to bring their previous branching method with them when they join the team. Some developers are used to performing individual wo...

2,285 views 9 12
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you