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

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

Lars Nordin December 19, 2013

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

0 votes
Daniel Cohen September 15, 2014

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

0 votes
cofarrell
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 21, 2013

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

Lars Nordin January 5, 2014

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?

cofarrell
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 6, 2014

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

0 votes
jcurleyWR
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 19, 2013

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

Was stash restarted as the correct user?

Lars Nordin January 5, 2014

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.

0 votes
Lars Nordin December 19, 2013

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

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events