签署提交时,如何停止使用GUI PGP密钥管理器?

发布于 2025-01-28 11:02:59 字数 177 浏览 3 评论 0 原文

我正在通过SSH在终端工作。当我提交时,我被要求提供一个密码来解锁我的私钥。只要我没有图形会话,运行所有内容都可以按预期运行。

问题在于,当我运行图形会话(XFCE)时,我会在该会话中而是在终端中提供密码。当图形会话正在运行时,如何强制Git/GPG2在终端中要求密码?

我使用Ubuntu 20.04 Lts。

I am working in terminal via ssh. When I commit, I am asked for a password to unlock my private key. As long as I have no graphical session running everything works as expected.

The problem is that when I have an graphical session running (XFCE), I am asked for the password in that session rather in the terminal. How can I force git/gpg2 to ask for password in the terminal when the graphical session is running?

I use Ubuntu 20.04 LTS.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

爱的那么颓废 2025-02-04 11:02:59

您可能需要一个 设置为/usr/bin/pinentry-tty (AS 在这里)。添加导出gpg_tty = $(tty)到您的〜/.bashrc

或者,如在此处建议,请致电:

gpg --pinentry-mode loopback --export-secret-keys -a | less

You might need a gpg-agent.conf with a --pinentry-program set to /usr/bin/pinentry-tty (as in here). Add export GPG_TTY=$(tty) to your ~/.bashrc.

Or, as suggested here, call gpg with:

gpg --pinentry-mode loopback --export-secret-keys -a | less
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文