diff --git a/modules/config/login.go b/modules/config/login.go index 0e7c58a..1d98fc4 100644 --- a/modules/config/login.go +++ b/modules/config/login.go @@ -228,5 +228,5 @@ func (l *Login) GetSSHHost() string { return "" } - return u.Hostname() + return u.Host } diff --git a/modules/task/login_create.go b/modules/task/login_create.go index 7131e2f..f736877 100644 --- a/modules/task/login_create.go +++ b/modules/task/login_create.go @@ -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, - // so we just use the hostname - login.SSHHost = serverURL.Hostname() + // so we just use the host + login.SSHHost = serverURL.Host if len(sshKey) == 0 { login.SSHKey, err = findSSHKey(client)