本文介绍了签署git commit时记住GPG密码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否可以保存GPG密码,这样每次进行git commit时都不会提示我输入密码?
Would it be possible for the GPG password to be saved, so that I am not prompted for the passphrase everytime I make a git commit?
推荐答案
您可以使用以下命令在~/.gnupg/gpg-agent.conf
中为gpg-agent设置超时期限:
You can set a timeout period for gpg-agent in ~/.gnupg/gpg-agent.conf
with this line:
default-cache-ttl 3600
这将告诉gpg-agent将密码短语存储一小时.您不希望它是不确定的,但是不经常输入它也是有好处的.
That would tell gpg-agent to store the passphrase for one hour. You wouldn't want it to be indefinite, but not constantly typing it is of benefit too.
这篇关于签署git commit时记住GPG密码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!