It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Permission denied (publickey) (sourcetree mac)

Pushing to git@bitbucket.org:(my repo).git

git@bitbucket.org: Permission denied (publickey).

fatal: Could not read from remote repository.

 

Please make sure you have the correct access rights

and the repository exists.

I suddenly started getting this, if I try to change everything thing back to default and try again, I get "device not configured".

 

This suddenly started happening after upgrading to High Sierra

2 answers

Please check if the ssh-agent has your keys loaded. If not, please add them to the agent. 

Run below commands in terminal to do so,

To check if keys are loaded:

ssh-add -l

To add keys to agent:

ssh-add <path_to_key>

more like,

ssh-add ~/.ssh/id_rsa

Key in the passphrase used while generating the ssh key and you should be good to go.

It appears this isn't the solution, there's a bug in the latest version of sourcetree.

Downgrading to the previous stable build fixed everything.

@hawken king can you tell which version does work for you?

Could you please confirm what version you used earlier and what was the result of running those commands on your machine?

It helps me.
Thx a lot.

What I did just yesterday to fix this problem:

1. Create "config" file in ~/.ssh

2. Put in this config:

Host = *
UseKeychain yes
AddKeysToAgent yes
IdentifyFile path/to/your/private/key
IdentityFile path/to/your/another/private/key

After that authentication goes smoothly(with help of "ssh-add -K identity"). This seems to be a change related to macOS update: required for Sierra or High Sierra. 

Suggest an answer

Log in or Sign up to answer
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Posted Jan 17, 2019 in Sourcetree

[dev team] Sourcetree for Windows 2019 Preview - Dark Theme

Hi folks, While the full post is over on our blog I'd like to share the dark theme we've got planned for 2019 here directly as well to keep the discussion going.  The ...

1,318 views 12 14
Join discussion

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