ARTICLE DETAIL

资讯详情

深耕编程入门与网站建设的一线实战洞察。

革命性GPG密钥管理:pinentry-touchid让macOS Touch ID秒解密码难题

革命性GPG密钥管理:pinentry-touchid让macOS Touch ID秒解密码难题 革命性GPG密钥管理pinentry-touchid让macOS Touch ID秒解密码难题【免费下载链接】pinentry-touchidCustom GPG pinentry program for macOS that allows using Touch ID for fetching the password from the macOS keychain.项目地址: https://gitcode.com/gh_mirrors/pi/pinentry-touchidpinentry-touchid是一款专为macOS设计的自定义GPG密码输入程序它允许用户利用Touch ID从macOS钥匙串中获取密码彻底改变了传统GPG密钥的管理方式让密码验证过程变得前所未有的快捷与安全。 亲眼见证Touch ID带来的便捷 工作原理大揭秘pinentry-touchid与gpg-agent协同工作通过以下规则提供密码当钥匙串中找不到给定密钥的密码条目时程序会回退到pinentry-mac程序获取密码。建议在对话框中取消勾选“保存到钥匙串”选项以增强安全性。一旦找到密码条目用户将看到Touch ID对话框成功认证后存储在钥匙串中的密码将返回给gpg-agent。若找到密码条目但在Touch ID成功认证后该条目并非由pinentry-touchid程序“拥有”则会显示常规密码输入框。这是macOS钥匙串强制执行的额外步骤。在该对话框中输入密码后点击“始终允许”pinentry-touchid就能在无需额外输入密码的情况下访问密码条目同时密码访问仍受Touch ID保护。 简单三步完成安装1️⃣ 安装前提条件确保已安装以下工具gnupgpinentry-mac可通过运行echo GETPIN | pinentry命令检查是否能看到pinentry-mac的GUI提示。若未看到可使用brew install pinentry-mac安装并通过alias pinentrypinentry-mac设置别名。2️⃣ Homebrew安装推荐执行以下命令$ brew tap jorgelbg/tap $ brew install pinentry-touchidHomebrew会显示后续步骤包括修复符号链接、配置gpg-agent.conf文件、重新加载gpg-agent以及禁用pinentry-mac的“保存到钥匙串”选项等。3️⃣ 手动安装从发布页面下载pinentry-touchid二进制文件。在~/.gnupg/gpg-agent.conf中添加或替换pinentry-program /usr/local/bin/pinentry-touchid可替换为二进制文件的实际存储路径。运行pinentry-touchid -check检查默认PIN程序配置若有错误可执行pinentry-touchid -fix自动修复符号链接。 手动添加GPG密钥密码到钥匙串首先执行security find-generic-password -s GnuPG检查pinentry-mac是否已使用钥匙串。若出现错误需先配置pinentry-mac$ defaults write org.gpgtools.common UseKeychain -bool yes确保~/.gnupg/gpg-agent.conf中的pinentry-program指向pinentry-mac然后重启GPG Agent$ gpgconf --kill gpg-agent使用echo 1234 | gpg -as -命令在弹出的提示中勾选“保存到钥匙串”并在可能出现的登录密码提示中选择“始终允许”。之后再次执行security find-generic-password -s GnuPG应能看到钥匙串条目。接着更新gpg-agent.conf将pinentry-program指向pinentry-touchid的完整路径重启GPG Agent并建议执行defaults write org.gpgtools.common DisableKeychain -bool yes禁用pinentry-mac的钥匙串存储选项。⚠️ 免责声明本项目不会将密码/PIN存储在设备的安全飞地中而是使用pinentry-mac若可用的普通钥匙串条目或创建新的钥匙串条目。✅ 已测试设备和系统版本pinentry-touchid已在以下设备和macOS版本组合上测试通过MacBook Pro (15-inch, 2018)macOS Catalina - 10.15.7MacBook Pro (15-inch, 2018)macOS Big Sur - 11.4, 11.5.0, 11.5.1MacBook Pro (16-inch, Late 2019)macOS Big Sur - 11.4, 11.5.1MacBook Pro (16-inch, Late 2021)macOS Monterey - 12.2通过pinentry-touchidmacOS用户可以告别繁琐的密码输入享受Touch ID带来的快速、安全的GPG密钥管理体验让每一次密码验证都变得轻松高效。【免费下载链接】pinentry-touchidCustom GPG pinentry program for macOS that allows using Touch ID for fetching the password from the macOS keychain.项目地址: https://gitcode.com/gh_mirrors/pi/pinentry-touchid创作声明:本文部分内容由AI辅助生成(AIGC),仅供参考
返回列表