After Stash upgrade can't use ssh key to access Stash from SourceTree

Using SourceTree v1.3.3.0

Using Stash v2.10.0

After our Stash system was upgraded to v2.10, I can no longer access my git repos via SourceTree using a ssh key. The error I get when trying to fetch (or pull) is:

----

git -c diff.mnemonicprefix=false -c core.quotepath=false fetch origin

FATAL ERROR: Disconnected: No supported authentication methods available (server sent: publickey)

fatal: Could not read from remote repository.

Please make sure you have the correct access rights

and the repository exists.

FATAL ERROR: Disconnected: No supported authentication methods available (server sent: publickey)

fatal: Could not read from remote repository.

Please make sure you have the correct access rights

and the repository exists.

----

The strange thing is that I have the same stash repos checked out on a linux system and from both sandboxes, using the git CLI, I can access the git repo just fine (using the same ssh key).

4 answers

This widget could not be displayed.

Note 1: I tried removing and re-adding my ssh key in stash but still not working in SourceTree

This widget could not be displayed.

Check that the URL (ssh) path to the server is correct (under administration, server settings).

Was stash restarted as the correct user?

Thanks. I haven't heard of other having the same problem after the restart so I believe that Stash was restarted as the same user.

This widget could not be displayed.

Hi Lars,

I'm not convinced that Stash is the cause here. That error looks like it's related to Putty and issues around the key either being in the wrong format. Have you double-checked the keys on that machine? What happens if you use the command line from the same Windows box?

Cheers,

Charles

Yeah, I've double checked the keys - that same key works fine with putty ssh-ing into the same server (I know, I know - this is accessing an ssh server not stash and not the same public key) but the public keys are the same and putty pageant key agent holds the same private key which is used both by SourceTree and Putty.

How would I run the command from command line?

Hi Lars,

If you open up Git Bash, which I believe should be installed on your machine, and run the following:

> git fetch

What error does that give?

Cheers,

Charles

This widget could not be displayed.

I cloned the repository into a new folder and it started working

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Aug 21, 2018 in Bitbucket

Branch Management with Bitbucket

As a project manager, I have discovered that different developers want to bring their previous branching method with them when they join the team. Some developers are used to performing individual wo...

1,315 views 8 11
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