Handle GitLab's default SSH notation

On GitLab the default SSH style is like git@gitlab.example.com:user/repo
Now it recognizes this format as well on your own GitLab installation.
This commit is contained in:
Frank Fesevur 2016-10-27 14:01:14 +02:00
parent 485bb31427
commit 36f9a77956

View file

@ -96,6 +96,9 @@ else
if [ -n "$gitlab_domain" ]; then
if grep -q "$gitlab_domain" <<<$giturl; then
# Handle GitLab's default SSH notation (like git@gitlab.domain.com:user/repo)
giturl=${giturl/git\@${gitlab_domain}\:/https://${gitlab_domain}/}
# handle SSH protocol (links like ssh://git@gitlab.domain.com/user/repo)
giturl=${giturl/#ssh\:\/\//https://}