summaryrefslogtreecommitdiffstats
path: root/models/ssh_key.go
diff options
context:
space:
mode:
Diffstat (limited to 'models/ssh_key.go')
-rw-r--r--models/ssh_key.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/models/ssh_key.go b/models/ssh_key.go
index fa33cd4c15..38b172d2ed 100644
--- a/models/ssh_key.go
+++ b/models/ssh_key.go
@@ -376,6 +376,7 @@ func calcFingerprint(publicKeyContent string) (string, error) {
if err != nil {
return "", err
}
+ defer os.Remove(tmpPath)
stdout, stderr, err := process.GetManager().Exec("AddPublicKey", "ssh-keygen", "-lf", tmpPath)
if err != nil {
return "", fmt.Errorf("'ssh-keygen -lf %s' failed with error '%s': %s", tmpPath, err, stderr)