加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

如何在Xcode源代码控制中使用GPG签名?

发布时间:2020-12-14 17:51:45 所属栏目:百科 来源:网络整理
导读:每当我尝试提交我的文件时,都会收到以下错误消息: gpg: cannot open `/dev/tty’: Device not configured error: gpg failed to sign the data fatal: failed to write commit object 哎呀!这是因为我为git启用了GPG签名. 是否可以在Xcode存储库中使用GPG
每当我尝试提交我的文件时,都会收到以下错误消息:

gpg: cannot open `/dev/tty’: Device not configured
error: gpg failed to sign the data
fatal: failed to write commit object

哎呀!这是因为我为git启用了GPG签名.

是否可以在Xcode存储库中使用GPG签名?

这不是一个大问题,因为它很容易禁用GPG签名(git config commit.gpgsign true),但这是一个相当不错的识别.

解决方法

这里的问题是默认的pinentry(密码对话框)是基于终端的,当你在Xcode中时,不会在附加终端的情况下调用 Git.因此,GnuPG无法提示您输入密码.

处理此问题的最简单方法是使用brew install pinentry-mac安装Mac pinentry.然后,您可以使用pinentry-program /usr/local/bin / pinentry-mac更新?/ .gnupg / gpg-agent.conf.您可能需要终止任何正在运行的gpg-agent进程,以便他们获取新配置.

有关如何执行此操作的相当全面的文档集可在GitHub Gist中找到.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读