diff --git a/models/asymkey/ssh_key_parse.go b/models/asymkey/ssh_key_parse.go index 8693c87e76..7e61e61dae 100644 --- a/models/asymkey/ssh_key_parse.go +++ b/models/asymkey/ssh_key_parse.go @@ -16,7 +16,6 @@ import ( "strconv" "strings" - "code.gitea.io/gitea/models/db" "code.gitea.io/gitea/modules/log" "code.gitea.io/gitea/modules/process" "code.gitea.io/gitea/modules/setting" @@ -158,10 +157,6 @@ func parseKeyString(content string) (string, error) { // CheckPublicKeyString checks if the given public key string is recognized by SSH. // It returns the actual public key line on success. func CheckPublicKeyString(content string) (_ string, err error) { - if setting.SSH.Disabled { - return "", db.ErrSSHDisabled{} - } - content, err = parseKeyString(content) if err != nil { return "", err diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini index 7e9675ee73..bd7e64fc6d 100644 --- a/options/locale/locale_en-US.ini +++ b/options/locale/locale_en-US.ini @@ -739,6 +739,7 @@ principal_state_desc = This principal has been used in the last 7 days show_openid = Show on profile hide_openid = Hide from profile ssh_disabled = SSH Disabled +ssh_signonly = SSH is currently disabled so these keys are only used for commit signature verification. ssh_externally_managed = This SSH key is externally managed for this user manage_social = Manage Associated Social Accounts social_desc = These social accounts are linked to your Gitea account. Make sure you recognize all of them as they can be used to sign in to your Gitea account. diff --git a/templates/user/settings/keys_ssh.tmpl b/templates/user/settings/keys_ssh.tmpl index 5d518f3bb0..160dedc93c 100644 --- a/templates/user/settings/keys_ssh.tmpl +++ b/templates/user/settings/keys_ssh.tmpl @@ -1,13 +1,9 @@