Skip to content

Find, verify, and analyze leaked credentials

added http protocol support for gitlab repositories (#662)

Ariel Ril2515fbeebed5
diff --git a/pkg/giturl/giturl.go b/pkg/giturl/giturl.go
index c6bd3fce3..c052b315e 100644
--- a/pkg/giturl/giturl.go
+++ b/pkg/giturl/giturl.go
@@ -24,8 +24,8 @@ func NormalizeGithubRepo(repoURL string) (string, error) {
}
func NormalizeGitlabRepo(repoURL string) (string, error) {
- if !strings.HasPrefix(repoURL, "https") {
- return "", errors.New("Gitlab requires https repo urls: e.g. https://gitlab.com/org/repo.git")
+ if !strings.HasPrefix(repoURL, "http:") && !strings.HasPrefix(repoURL, "https:") {
+ return "", errors.New("Gitlab requires http/https repo urls: e.g. https://gitlab.com/org/repo.git")
}
return NormalizeOrgRepoURL("Gitlab", repoURL)