SourceTree Windows Errors Communicating with remote

Every time I try to do anything with a remote repository via pull, push, etc; I get the following error:

git -c diff.mnemonicprefix=false -c core.quotepath=false fetch origin
Unable to open connection:

Host does not existfatal: The remote end hung up unexpectedly

Completed with errors, see above.
All these functions work fine in git bash so I am a little confused as to what is happening. I do have my repository set as alias in my git config.
Example:
Client uses:
-repos:/PROJ/repo.git (This is from Stash)
Git config:
host repos
identityfile ~/.ssh/id_rsa
port 8199
user git
hostname repo.domain.com

Does it not support the alias? I did load in my ssh key using a ppk that was converted using the import tool. Thanks for any help that is given.

2 answers

1 accepted

I was able to make this work by doing the following in Putty:

  1. I created a saved session in putty called 'repos' (same as in the 'host' entry in your .ssh/config)
  2. Set the hostname/port to repo.domain.com and 8199
  3. Set the "Auto-login username" under Connection --> Data to 'git'
  4. Save the session

Then, in PuttyGen:

  1. Conversions --> Import key
  2. Then select your ~/.ssh/id_rsa
  3. Save that as a .ppk key

Then, in Pageant

  1. Add key, and select your newly created .ppk key

Finally, I restarted SourceTree (not sure if that is necessary), and it worked for me.

Thanks this was actually the workaround that was given to me by Atlassian Support. My only problem with this is that I am using Git Bash as my default terminal so I, in my view, expect it to use it also for authentication instead of using PuTTy like other clients.

The issue stems from aliases not being supported and the requirement that Pageant must be running in order to use SSH keys when passphrases. I will enter a support ticket as this does not seem to be desired functionality.

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Published Jan 23, 2018 in Sourcetree

Tip from the team: workflow and keyboard shortcuts

Supported Platforms macOS Sourcetree has a lot to offer and, like many developer tools, finding and using it all can be a challenge, especially for a new user. Everyone might not love ...

799 views 0 4
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