Login requires a http/https login URL and revmoe SSH as a login method. SSH will be optional (#826)

Fix #825

Reviewed-on: https://gitea.com/gitea/tea/pulls/826
This commit is contained in:
Lunny Xiao
2025-10-18 23:09:27 +00:00
parent 61d4e571a7
commit 90f8624ae7
4 changed files with 41 additions and 59 deletions

View File

@@ -68,9 +68,6 @@ func CreateLogin(name, token, user, passwd, otp, scopes, sshKey, giteaURL, sshCe
token,
user,
passwd,
sshAgent,
sshKey,
sshCertPrincipal,
)
if err != nil {
return err
@@ -95,7 +92,7 @@ func CreateLogin(name, token, user, passwd, otp, scopes, sshKey, giteaURL, sshCe
VersionCheck: versionCheck,
}
if len(token) == 0 && sshCertPrincipal == "" && !sshAgent && sshKey == "" {
if len(token) == 0 {
if login.Token, err = generateToken(login, user, passwd, otp, scopes); err != nil {
return err
}