通过 HTTPS 保存 Git 的客户端证书密码?
我正在尝试使用仅使用客户端证书通过 HTTPS 提供访问的远程 Git 存储库。我(终于……)让它工作了,但现在我遇到了一个小问题——每次我触摸遥控器时,Git 都会提示我输入证书密码。显然,这很快就会过时。
如果我使用 SSH,我可以按照 官方指南 来提供凭证 ssh-代理
。但是,据我所知,没有办法让 Git(或 Curl,我认为 Git 在底层存根的库)使用 ssh-agent 来访问 HTTPS 连接的凭据。我也可以将这两者中的任何一个绑定到 gnome-keyring 来作为密码,但我在网上没有找到任何关于这两种方法的信息。
能做到吗?我也许能够说服服务器管理员打开 SSH 访问,我确信这会解决我的问题,但与此同时,如果我能让它保存HTTPS 的密码。
I'm trying to use a remote Git repository that only provides access over HTTPS using client certificates. I've (finally...) gotten it working, but now I'm running into a minor issue -- every time I touch the remote, Git prompts me for the certificate passphrase. Obviously, this gets old fast.
If I were using SSH, I could follow the official guide to provide credentials with ssh-agent
. But, AFAICT there's no way to have Git (or Curl, which is the library I think Git stubs out to under the hood) use ssh-agent to access credentials for an HTTPS connection. I'd also be fine with tying either of those two to gnome-keyring
for the passphrase, but I haven't found anything about either approach online.
Can it be done? I might be able to talk the server admin into turning on SSH access, which I'm sure would sort me right out, but in the meantime it'd be easier if I could get it to save the passphrase for HTTPS.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
2013 年更新:这是在 git 1.8.0 中添加的。 这个问题解释了如何使用新的 gnome-keyring 凭据帮手。
UPDATE 2013: This was added in git 1.8.0. This question explains how to use the new gnome-keyring credential helper.