sourcetree can't push after updating to latest version

After updating to version 2.7 (macOS Sierra), source tree can't push anymore.

Pushing to ssh://git@git.abc.com/abc.git

Permission denied (publickey).

fatal: Could not read from remote repository.

Please make sure you have the correct access rights

and the repository exists.

I can push though from the command line after entering my passphrase. I can fetch and pull with no problem from source tree.

1 answer

1 accepted

2 votes
Accepted answer

You can check if the keys are loaded to the agent and if not, load them manually. This would just work fine with Sourcetree.

To check if key is loaded, use this command

ssh-add -l 

To load keys, use this command

ssh-add <path_to_key> 

e.g.,

ssh-add ~/.ssh/id_rsa 

 

Additionally, please check if the account added in Preferences and remote URL used for clone match protocols (both are ssh).

Thanks, it worked

Like 1 person likes this

Worked!

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Oct 23, 2018 in Sourcetree

Tip from the team: configure your repos for hosting goodness!

Supported Platforms macOS Windows We recently introduced support for additional hosting services such as GitHub Enterprise, GitLab (Cloud, Community Edition, Enterprise Edition), and...

710 views 3 2
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