Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root


1 badge earned


Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!


Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.


Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!


Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

Failed to connect with SourceTree over SSH

On Windows7, using SourceTree 1.6.20 I cannot connect to the remote server over SSH. Fetch, pull, etc. fail. Neither OpenSSH nor Putty/Plink in the Client SSH Configuration works. (Everything is fine with Git from the command line).

With OpenSSh, the CMD prompt for my passphrase opens and closes immediately, without any chance to actually enter the passphrase (This used to work on my old machine with the same key pair).

With Putty/Plink, I'm presented with a server SSH fingerprint which I cannot accept (as it is only in the "Show Full Output" dialog which is not interactive).

Running Plink directly on the command line offers a different fingerprint, so accepting this has no effect on the SourceTree behavior.

7 answers

1 accepted

3 votes
Answer accepted
rrudnicki Atlassian Team Sep 22, 2015

Hi Thomas, 

Did you checked this configuration?

Also are you getting some error or the cmd prompt just close?


In case you still face issues, raise a ticket with us smile


Renato Rudnicki 

Hi Renato, Thanks for getting back. - I went again through the steps of the link you provided. Once I entered the repository source URL and tab to the destination path, I get this error: "The OpenSSH agent is running but the server still rejected your connection. You may need to add the correct key to your agent by selecting Tools > Add SSH Key. ..." Let me say that at this point I had already added my private SSH key alright. (This is also the error message I get when pulling/pushing on a repo that I added from a local working copy.) Choosing "Close" on the error dialog leaves me with the "Clone / Add / Create Repository" dialog, where the Repository Type field is set to: "? This is not a valid source path / URL". Clicking the associated "Details..." button opens another message window saying: "Permission denied (publickey). fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists." ----- As for the cmd prompt, it flashes by so fast that I cannot say if it contains an error message or not. Is there anyway to make it stay open? I'll open a ticket, and will link to this question. Thanks, Thomas


I got the same problem. If I want to push or pull to/from my external (2nd) repo the program does not ask for login/password. Just present:

git -c diff.mnemonicprefix=false -c core.quotepath=false push -v --tags --set-upstream Home-CB master:master
Pushing to ssh://

FATAL ERROR: Server unexpectedly closed network connection

fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

With pure git-bash and tortoise-git it works.


And NO I don't want to use public-key for several reasons.

That's not the same problem, the OP is getting a password prompt but it vanishes immediately, and they're getting SSH fingerprint issues, depending on which method they use. You're just not getting any password prompt at all, with no SSH fingerprint issues. I am however getting the same issue as you. No password prompt, SourceTree just fails with the "FATAL ERROR: Server unexpectedly closed network connection" after the server drops the connection because no password was provided after some timeout. TortoiseGit and Git Bash both work fine for me too.

it's a bug to me. just open Putty once and try to connect to the host via ssh. Yes this mostly won't work since you don't have complete shell access on most git hosts but putty will prompt you for the same message confirmation.

Accept it, switch back to SourceTree and: happy fetching


I have the same issue. It used to work fine for me but does not work since Win 10 update. I have installed the latest  Source Tree. I think the cmd prompt to enter passphrase does appears briefly but disappears before I can enter it. 

Git bash is all good.

Try starting SourceTree from the Git bash (rather than desktop icon, start menu, etc.).

No change, does not work either.

@Libor Nenadál The ticket status is "Closed, resolved with existing knowledge". The solution was what I wrote in my comment to Rahul: Start SourceTree from a Git Bash prompt (you might have to specify the complete Path to the SourceTree executable). Then the ensuing command prompt for your passphrase stays open and the passphrase can be entered.

What is the ticker status? When I try to access the URL it says: "You do not have permission to view this request." sad

Here is the corresponding ticket over at Atlassian Support:

That link is broken

Suggest an answer

Log in or Sign up to answer

Atlassian Community Events