Skip to content
This repository has been archived by the owner on May 27, 2022. It is now read-only.

Commit

Permalink
Merge pull request #187 from getantibody/gitlab
Browse files Browse the repository at this point in the history
added gitlab ssh clone support
  • Loading branch information
caarlos0 authored Jul 23, 2017
2 parents 4175f26 + cbfa1f7 commit a6be4a2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 2 additions & 0 deletions project/git.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ func NewGit(cwd, line string) Project {
fallthrough
case strings.HasPrefix(repo, "ssh://"):
fallthrough
case strings.HasPrefix(repo, "git@gitlab.com:"):
fallthrough
case strings.HasPrefix(repo, "git@github.com:"):
url = repo
}
Expand Down
7 changes: 5 additions & 2 deletions project/git_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,11 @@ func TestDownloadAllKinds(t *testing.T) {
"https://github.com/caarlos0/ports",
"https://github.com/caarlos0/ports.git",
"git://github.com/caarlos0/ports.git",
// "ssh://git@github.com/caarlos0/ports.git", FIXME
// "git@github.com:caarlos0/ports.git", FIXME
"https://gitlab.com/caarlos0/test.git",
// FIXME: those fail on travis:
// "git@gitlab.com:caarlos0/test.git",
// "ssh://git@github.com/caarlos0/ports.git",
// "git@github.com:caarlos0/ports.git",
}
for _, url := range urls {
home := home()
Expand Down

0 comments on commit a6be4a2

Please sign in to comment.