Skip to content

Commit 2830c5f

Browse files
Quick quit ssh://
1 parent 5ca8e61 commit 2830c5f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

modules/git/remote.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,9 @@ func IsRemoteNotExistError(err error) bool {
9191

9292
// normalizeSSHURL converts SSH-SCP format URLs to standard ssh:// format for security
9393
func normalizeSSHURL(remoteAddr string) (string, error) {
94+
if strings.HasPrefix(remoteAddr, "ssh://") {
95+
return remoteAddr, nil
96+
}
9497
if strings.Contains(remoteAddr, "://") {
9598
return remoteAddr, errors.New("remoteAddr has a scheme")
9699
}

0 commit comments

Comments
 (0)