aboutsummaryrefslogtreecommitdiff
path: root/models/publickey.go
diff options
context:
space:
mode:
Diffstat (limited to 'models/publickey.go')
-rw-r--r--models/publickey.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/models/publickey.go b/models/publickey.go
index 04ae4c42..68e078ac 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)
}