简体   繁体   English

我可以使用 osxkeychain 为 git 管理我的 SSH 密码吗?

[英]Can I manage my SSH passphrase with osxkeychain, for git?

I'm trying to manage git credentials with keychain.我正在尝试使用钥匙串管理 git 凭据。 I'm using我在用着

git config --global credential.helper osxkeychain

then do然后做

% git pull                                                                                           
Enter passphrase for key '/.ssh/id_ed25519': 
Already up to date.
% git pull
Enter passphrase for key '/.ssh/id_ed25519': 
Already up to date.
%

Which tells me git is not remembering passwords.这告诉我 git 不记得密码。 Is there any way to remember the passphrases?有什么办法可以记住密码吗?

I confirm the credential.helper is only there to cache HTTPS credentials.我确认 credential.helper 仅用于缓存 HTTPS 凭据。 It would not be used for SSH connection at all.它根本不会用于 SSH 连接。

You can add your key to the SSH agent in order to cache the passphrase which allows for your private key to be decrypted.您可以将您的密钥添加到 SSH 代理,以缓存允许您的私钥被解密的密码。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM