SSH Cloning: Using relative paths (starting with tilde)


#1

I am currently migriting to gitlab!
Cloning via http and ssh is working if I use the urls from the gitlab gui.

Typically, the ssh-cloning url looks like: git@git.example.com:path/to/repo.git.
But the ssh-cloning urls from the previous git-solution looks like: git@git.example.com:~/path/to/repo.git.

It can be seen, that both urls are different and therefore I would need to update all submodules.
Which I want to prevent.

The questions are now:

  • How can I achieve relative paths starting with a tilde in gitlab in order to prevent changing all git submodule definitions?
    I.e. cloning a repo with the command git clone git@git.example.com:~/path/to/repo.git should succeed in gitlab.

  • If this is not possible, is there any other possibility like a ssh-proxy which turns the compatibility urls into urls that gitlab understands?

I am working with the gitlab-ce omnibus package in ubuntu 18.04.

thanks