Home:ALL Converter>cloning git-repository from stash via ssh

cloning git-repository from stash via ssh

Ask Time:2013-09-23T14:13:17         Author:Vince

Json Formatter

I've got a git-repository running on a stash-server. Cloning the repository via http works fine

git clone http://user@server:7990/a/b/sandbox.git

For some weird reason, when I switch http with ssh and with it the port, it gives me

git clone ssh://user@server:7999/a/b/sandbox.git
Cloning into sandbox...
fatal: remote error: Remote URL invalid
A repository could not be determined from the remote URL. Please confirm the
clone URL in Stash and try again. URL suffix: '/scm/ct/sandbox.git'
fatal: The remote end hung up unexpectedly

The server has ssh enabled and the port set to 7999. How comes, that it can't find the repository when the request is sent via ssh rather than http?

Author:Vince,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/18952795/cloning-git-repository-from-stash-via-ssh
Vince :

Problem solved. For some reason, the SSH-URL-suffix for the repository is different from the HTTP-URL-suffix. After finding that out, it worked. \n\nEdit:\nThe http-url stash gave me was user@server:7990/a/b/sandbox.git, while the ssh-url stash gave me is user@server:7999/b/sandbox.git (where a and b are of course placeholders).\n\nAs it was mentioned in the comments, that I should add this to my answer.",
2013-09-23T08:30:33
yy