如何在Windows上安装和使用gpg-agent?
发布时间:2020-12-14 04:00:52 所属栏目:Windows 来源:网络整理
导读:我正在尝试开始签署 Git提交.我使用keybase.io设置了一个GPG密钥,并将其同步到我的本地计算机和我的Git服务器上.现在,我正在尝试解决在每次提交时键入密钥密码的问题. PS git commit -m "testing" --allow-emptyYou need a passphrase to unlock the secret
我正在尝试开始签署
Git提交.我使用keybase.io设置了一个GPG密钥,并将其同步到我的本地计算机和我的Git服务器上.现在,我正在尝试解决在每次提交时键入密钥密码的问题.
PS> git commit -m "testing" --allow-empty You need a passphrase to unlock the secret key for user: "keybase.io/anthonymastrean <anthonymastrean@keybase.io>" 2048-bit RSA key,ID AD9184C0,created 2015-04-14 (main key ID 293FEB8B) Enter passphrase: 据我了解,我需要安装gpg-agent之类的东西.我在Windows 10 Pro 1803上,所以我在看Gpg4win(由GitHub和其他人推荐).我是通过Chocolatey安装的,所以我有完整的默认安装. 但是,我无法弄清楚如何让gpg-agent开始缓存我的密码.我每次提交时都会被提示. gpg-agent表示正在运行 PS> gpg-agent gpg-agent[4644]: gpg-agent running and available 我有这个gpg-connect-agent的东西,但我不知道该怎么做. PS> gpg-connect-agent.exe > help # NOP # CANCEL # OPTION # BYE # AUTH # RESET # END # HELP # GETEVENTCOUNTER # ISTRUSTED <hexstring_with_fingerprint> # HAVEKEY <hexstrings_with_keygrips> # KEYINFO [--[ssh-]list] [--data] [--ssh-fpr] [--with-ssh] <keygrip> # SIGKEY <hexstring_with_keygrip> # SETKEY # SETKEYDESC plus_percent_escaped_string # SETHASH (--hash=<name>)|(<algonumber>) <hexstring> # PKSIGN [<options>] [<cache_nonce>] # PKDECRYPT [<options>] # GENKEY [--no-protection] [--preset] [--inq-passwd] # READKEY <hexstring_with_keygrip> # GET_PASSPHRASE [--data] [--check] [--no-ask] [--repeat[=N]] # PRESET_PASSPHRASE [--inquire] <string_or_keygrip> <timeout> [<hexstring>] # CLEAR_PASSPHRASE [--mode=normal] <cache_id> # GET_CONFIRMATION <description> # LISTTRUSTED # MARKTRUSTED <hexstring_with_fingerprint> <flag> <display_name> # LEARN [--send] [--sendinfo] [--force] # PASSWD [--cache-nonce=<c>] [--passwd-nonce=<s>] [--preset] # INPUT # OUTPUT # SCD <commands to pass to the scdaemon> # KEYWRAP_KEY [--clear] <mode> # IMPORT_KEY [--unattended] [--force] [<cache_nonce>] # EXPORT_KEY [--cache-nonce=<nonce>] [--openpgp] <hexstring_with_keygrip> # DELETE_KEY [--force|--stub-only] <hexstring_with_keygrip> # GETVAL <key> # PUTVAL <key> [<percent_escaped_value>] # UPDATESTARTUPTTY # KILLAGENT # RELOADAGENT # GETINFO <what> # KEYTOCARD [--force] <hexstring_with_keygrip> <serialno> <id> <timestamp> OK 我看到man页面讨论了如何在Bash会话中启动gpg-agent,但我不确定如何将其转换为Windows并让它在cmd.exe和PowerShell中运行. https://linux.die.net/man/1/gpg-agent 解决方法
我需要通知git我已安装的gpg程序,它本身知道它应该使用的gpg-agent.
PS> git config --global gpg.program $(Resolve-Path (Get-Command gpg | Select-Object -Expand Source) | Select-Object -Expand Path) 设置此配置后,弹出Gpg4win的“PIN Entry”对话框! 我可能会遗漏一些自动启动gpg-agent或了解会话生命周期的内容,但我会回过头来了解更多细节. (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
相关内容
- winapi – 在窗口模式下在Windows 10上等待VBLANK的正确方法
- windows-server-2008 – 为什么我不能以域用户身份运行Wind
- windows-server-2008-r2 – Server 2008 R2 WMI问题
- Windows上的Meteor JS,支持iOS和Android
- Windows线程调度程序是不公平的?
- windows – MSTSC:远程桌面上的黑色区域
- Windows 10 下彻底关闭 Hyper-V 服务
- Microsoft SQL Server 2008 – 日期
- 如何将十六进制字符串转换为Uint8Array并返回JavaScript?
- windows-runtime – 在Windows Phone 8.1 Universal应用程序
推荐文章
站长推荐
- windows – nt!没有Args的KeWaitForSingleObjec
- windows-10 – 在Windows 10 Fall Creators Upda
- 批处理文件 – 只有DIR前10个文件的MS DOS脚本,降
- 如何在Windows XP下监控Windows服务的状态变化?
- winapi – Win32 API在当前的Windows版本中仍然是
- winapi – Win32 WM_SETCURSOR,WM_MOUSEMOVE总是
- wcf – 什么是任务管理器中的CPU时间?
- windows-phone-7 – 如何在Windows手机应用程序中
- api-ms-win-crt-runtime-|1-1-0.dll丢失的解决方
- windows-server-2008 – 如何阻止IIS在停止时接受
热点阅读