Git 总是提示输入密码

Phi*_*unt 3 mac ssh git macos

我已按照以下指南在 Mac OS 10.7.4 上设置 SSH 密钥。

https://help.github.com/articles/generating-ssh-keys

但出于某种原因,它不断提示我输入密码。如果我不指定密码,它不会提示我,但这是不希望的。有没有办法缓存我的密码,这样每次拉/推都不会提示我?

Rya*_*yan 10

这篇文章

在钥匙串中存储密码

要在钥匙串中存储默认密钥的密码,请打开终端并运行:

ssh-add -K
Run Code Online (Sandbox Code Playgroud)

并为不同的密钥运行存储密码:

ssh-add -K /path/to/private/key/file
Run Code Online (Sandbox Code Playgroud)

当提示您输入密码时,输入它,就是这样。

您将永远不需要运行 ssh-add 或再次输入您的密码。