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

Howto use ssh protocol for a Stash host (remote) instead of https

Deleted user February 4, 2015

Bildschirmfoto 2015-02-05 um 08.28.56.png

I tried to use the SSH protocol for our local Stash server. Trying to specify the Host URL - like ssh://git@stash.example.com:7999/ - I'll always get a message about a malformed URL. Using HTTPS instead is possible and works, but I don't want to use user credentials here.

How can I configure the access using the SSH protocol?

1 answer

0 votes
Balázs Szakmáry
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.
February 4, 2015

First you need to upload your SSH key into your account on the Stash server at http://<serverURL>/plugins/servlet/ssh/account/keys

Once you are done with this, I think you just need to just write http://<serverURL>/ into the dialog above.

Deleted user February 4, 2015

I've already added my keys on the server side. I can use the "clone using SourceTree" link within the Stash Web UI, but I can't use ssh for the local SourceTree integration as shown above. Using http(s) as suggested works, but I want to use ssh instead to avoid the user credentials here.

Balázs Szakmáry
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.
February 4, 2015

You said your problem was that the URL was malformed. You need to specify it as http://<serverURL>/ (and select SSH at the bottom). Not sure if you can get away here without giving your user/pass once, but you will definitely not have to give them any more.

Deleted user February 4, 2015

Selecting SSH doesn't change it as expected. Using clone for a remote configuration like this, always uses http(s) using the user credentials and the specified URL.

Balázs Szakmáry
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.
February 4, 2015

This is only for the "Hosted Repositories" feature. The individual clones use HTTP(S)/SSH depending on what clone URL is given in the origin URL in the repository settings. If you cloned a repo using HTTP(S), you need to change the origin URL in the repository settings.

Michael Bender April 1, 2015

I'm trying to do the same thing. https access to my local Stash server works fine, but when I try to browse the remote repos using ssh authentication, I am prompted for a password which doesn't make sense since ssh authentication doesn't need a password. If I enter something in the password field, ST now tells me that I have a malformed URL. I'm getting the impression that the ST devs didn't ever actually test this.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events