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

Permission denied (publickey) - continues to be an issue

finwitz November 19, 2017

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

0 votes
Ana Retamal
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 22, 2017

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
TAGS
AUG Leaders

Atlassian Community Events