diff options
author | Unknwon <u@gogs.io> | 2015-11-02 14:01:19 -0500 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2015-11-02 14:01:19 -0500 |
commit | 75aab86a8dcc008f7da5fa76e4637c1839263fc2 (patch) | |
tree | 5165e40e6fd52d88d22539e325854fb6d1eaff4c /models/publickey.go | |
parent | 92535c9df02cc9b25bdbbc4fab766218fe8a8834 (diff) | |
download | gitea-75aab86a8dcc008f7da5fa76e4637c1839263fc2.tar.gz gitea-75aab86a8dcc008f7da5fa76e4637c1839263fc2.zip |
fix problem with #1879
Diffstat (limited to 'models/publickey.go')
-rw-r--r-- | models/publickey.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/models/publickey.go b/models/publickey.go index 04ae4c42fc..68e078ac85 100644 --- a/models/publickey.go +++ b/models/publickey.go @@ -243,7 +243,7 @@ func CheckPublicKeyString(content string) (_ string, err error) { } keyType := strings.Trim(sshKeygenOutput[len(sshKeygenOutput)-1], " ()") if minimumKeySize := setting.Service.MinimumKeySizes[keyType]; minimumKeySize == 0 { - return "", errors.New("sorry, unrecognized public key type") + return "", fmt.Errorf("unrecognized public key type: %s", keyType) } else if keySize < minimumKeySize { return "", fmt.Errorf("the minimum accepted size of a public key %s is %d", keyType, minimumKeySize) } |