Sourcetree doesn't pick up private key?

Hi,

i'm trying to add an exisiting Mercurical Repo to Sourcetree:

Clone Repository Screen

But Sourcetree immediately prompts me to enter a password which would be added to the keychain.

Keychain Password required

How can I tell it to use the private key located in ~/.ssh/id_rsa ?

2 answers

1 accepted

No my key is already registered on the server.

The Problem was my local key. SSH told me on the command line:

Permissions 0644 for '/Users/ashiso/.ssh/id_rsa' are too open.
It is required that your private key files are NOT accessible by others.
This private key will be ignored.

So I changed the permissions:

chmod 700 ~/.ssh/id_rsa

.. and SSH stopped complaining. After that I cloned the repo from the command line, which worked just fine

hg clone ssh://hg@hg.anonymox.net/client

And then added the working repo to Sourcetree. Anyway thanks for the help!

Glad you got it working, thanks for telling us what the problem was, I'll make sure I use your advice if this problem was to crop up again. Could you mark your response as the answer when you get the chance (and I think you have to wait a while until you can mark it as the answer).

Cheers!

Hi Alexander,

This is most likely because the server rejected your key, which is also why SourceTree is reporting your URL as invalid. Make sure your server has your public key and it's the correct one.

If you need any more help on this one, do let us know.

Hope that's of help

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published May 30, 2018 in Sourcetree

Tip from the team: configuring Git or Mercurial in Sourcetree

Supported Platforms macOS Windows To make using Sourcetree as simple yet powerful as possible we embed (bundle) dependencies such as Git, Git LFS, and Mercurial. We strive to keep these...

563 views 1 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