diff options
author | Michael Kuhn <suraia@ikkoku.de> | 2017-11-21 04:49:33 +0100 |
---|---|---|
committer | Lunny Xiao <xiaolunwen@gmail.com> | 2017-11-21 11:49:33 +0800 |
commit | 420fc8efc24d7a77598307557e5b38077d0efafc (patch) | |
tree | 9e94b3b70771e2ab053fab8ace2dd19f6f882d5b /models/ssh_key.go | |
parent | 1f7aab6e1976a58fef4c0f328d7ed30a30d3b476 (diff) | |
download | gitea-420fc8efc24d7a77598307557e5b38077d0efafc.tar.gz gitea-420fc8efc24d7a77598307557e5b38077d0efafc.zip |
Disable add key button if SSH is disabled (#2873)
Diffstat (limited to 'models/ssh_key.go')
-rw-r--r-- | models/ssh_key.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/models/ssh_key.go b/models/ssh_key.go index 15544efbc6..2d9f521fd4 100644 --- a/models/ssh_key.go +++ b/models/ssh_key.go @@ -260,7 +260,7 @@ func SSHNativeParsePublicKey(keyLine string) (string, int, error) { // It returns the actual public key line on success. func CheckPublicKeyString(content string) (_ string, err error) { if setting.SSH.Disabled { - return "", errors.New("SSH is disabled") + return "", ErrSSHDisabled{} } content, err = parseKeyString(content) |