diff --git a/sources/git.go b/sources/git.go index 73f713f2..790eaafa 100644 --- a/sources/git.go +++ b/sources/git.go @@ -440,7 +440,7 @@ End: } } -var sshUrlpat = regexp.MustCompile(`^git@([a-zA-Z0-9.-]+):([\w/.-]+?)(?:\.git)?$`) +var sshUrlpat = regexp.MustCompile(`^git@([a-zA-Z0-9.-]+):(?:\d{1,5}/)?([\w/.-]+?)(?:\.git)?$`) func getRemoteUrl(source string) (*url.URL, error) { // This will return the first remote — typically, "origin".