How do I configure sourcetree to work with Open SSH Aliases(or their Putty style equivalents)

In our normal setup connecting to Gitolite, we use SSH aliases to prevent us from doing anything foolish. Then, if we need admin power we can use an admin alias. I'm having trouble getting source tree to work with this structure since it doesn't seem to look at the ~/.ssh/config file. Is there a corresponding Putty file?

For clarity, my ~/.ssh/config file looks like the following

Host gitAdmin

User git

IdentityFile ~/.ssh/id_dsa_admin

Hostname git

Host gitDev

User git

IdentityFile ~/.ssh/id_dsa

Hostname git

I got around the issue by creating new remotes for sourcetree to pull from, but that feel likes a bit of a workaround.

1 answer

This widget could not be displayed.

If you need to use aliases with the PuTTY suite then you can do so by defining 'Saved Sessions' in the main PuTTY application itself. We don't actually include this in SourceTree because we only actually require plink (the terminal SSH transport) and Pageant (the agent), but you can download PuTTY.exe via the main site: http://www.putty.org/

Just download putty.exe, launch it, define some settings including the host etc then give it a name on the top-level 'Session' node and click Save to create a saved session. That name should be usable as an alias with plink too after that, which is what will be used for git SSH commands.

Suggest an answer

Log in or Sign up to answer
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...

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