mirror of
https://gitea.com/gitea/tea.git
synced 2024-11-21 18:11:36 +01:00
fix: non-standard ssh port URL's repo can't be recognized (#555)
Resolve #452 Reviewed-on: https://gitea.com/gitea/tea/pulls/555 Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com> Reviewed-by: 6543 <6543@obermui.de> Co-authored-by: Grady Wong <wgqimut@gmail.com> Co-committed-by: Grady Wong <wgqimut@gmail.com>
This commit is contained in:
parent
07039b82e3
commit
b2d845b8c7
@ -228,5 +228,5 @@ func (l *Login) GetSSHHost() string {
|
|||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|
||||||
return u.Hostname()
|
return u.Host
|
||||||
}
|
}
|
||||||
|
@ -90,8 +90,8 @@ func CreateLogin(name, token, user, passwd, sshKey, giteaURL, sshCertPrincipal,
|
|||||||
}
|
}
|
||||||
|
|
||||||
// we do not have a method to get SSH config from api,
|
// we do not have a method to get SSH config from api,
|
||||||
// so we just use the hostname
|
// so we just use the host
|
||||||
login.SSHHost = serverURL.Hostname()
|
login.SSHHost = serverURL.Host
|
||||||
|
|
||||||
if len(sshKey) == 0 {
|
if len(sshKey) == 0 {
|
||||||
login.SSHKey, err = findSSHKey(client)
|
login.SSHKey, err = findSSHKey(client)
|
||||||
|
Loading…
Reference in New Issue
Block a user