Is it possible to configure Stash SSH repository URI - omit "git@" and use lowercase?

Igor Sereda [ALM Works]
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.
March 11, 2013

Hi, I'd like to make our Stash repository URIs as cleaner and simpler as possible.

  1. Since Stash uses keys to authenticate a user via SSH, specifying username is rather redundant (and "git" fake username doesn't make much sense either).
  2. Lowercase letters in the URI arguably do look better and more conventional.

So instead of ssh://git@git/PROJ/repo.git I prefer to use ssh://git/proj/repo.git

It actually works!

But I'd like to have that form of the URI to be displayed on the Stash webpage in the "SSH" repository address.

Is that possible?

1 answer

0 votes
Alexey_Efimov
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.
March 11, 2013

Hello Igor! :)

Yes you can use follow form:

git clone git@stash.acme.com:/project/repo.git

The ':' is significant. Project maybe in lowercase and upper case, works ok both.

Question about username. If you omit git@, then SSH will use you login by default. It is not a comon way for git.

Igor Sereda [ALM Works]
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.
March 11, 2013

Hi Alex - nice to see you here :)

I'm not sure you got my question correctly. It is about the way Stash displays SSH URL when you look at the repository. I want it to be displayed slightly differently.

Where it comes to the URL we use, we use ssh://git/proj/repo.git and it works. There's no need for a second colon (but you need to use protocol name - ssh://...). And it is safe to omit "git@", and your local login name does not matter, because Stash authenticates SSH session only with ssh keys.

Thanks anyway :)
Igor

Alexey_Efimov
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.
March 12, 2013

Hm, you are right, it really works without git@ :) It work even without ssh:// prefix.

git clone stash.acme.com:/project/repo.git

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events