0
0
mirror of https://github.com/go-gitea/gitea.git synced 2026-06-18 05:03:00 +02:00
This commit is contained in:
Lunny Xiao 2026-06-09 23:14:39 -07:00
parent e0e5d6e5eb
commit afdb051961
No known key found for this signature in database
GPG Key ID: C3B7C91B632F738A

View File

@ -67,8 +67,8 @@ func endpointFromURL(rawurl string) *url.URL {
u.Scheme = "https"
return u
case "ssh", "git+ssh":
u.Scheme = "https"
u.Host = util.IfZero(u.Hostname(), u.Host)
u.Scheme = "https" // is it possible http?
u.Host = u.Hostname() // remove ssh port if any
u.Path = "/" + strings.TrimPrefix(u.Path, "/")
u.User = nil
return u