aboutsummaryrefslogtreecommitdiffstats
path: root/services/doctor/authorizedkeys.go
diff options
context:
space:
mode:
Diffstat (limited to 'services/doctor/authorizedkeys.go')
-rw-r--r--services/doctor/authorizedkeys.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/services/doctor/authorizedkeys.go b/services/doctor/authorizedkeys.go
index 8d6fc9cb5e..46e7099dce 100644
--- a/services/doctor/authorizedkeys.go
+++ b/services/doctor/authorizedkeys.go
@@ -7,6 +7,7 @@ import (
"bufio"
"bytes"
"context"
+ "errors"
"fmt"
"os"
"path/filepath"
@@ -78,7 +79,7 @@ func checkAuthorizedKeys(ctx context.Context, logger log.Logger, autofix bool) e
fPath,
"gitea admin regenerate keys",
"gitea doctor --run authorized-keys --fix")
- return fmt.Errorf(`authorized_keys is out of date and should be regenerated with "gitea admin regenerate keys" or "gitea doctor --run authorized-keys --fix"`)
+ return errors.New(`authorized_keys is out of date and should be regenerated with "gitea admin regenerate keys" or "gitea doctor --run authorized-keys --fix"`)
}
logger.Warn("authorized_keys is out of date. Attempting rewrite...")
err = asymkey_service.RewriteAllPublicKeys(ctx)