gpt4 book ai didi

Git - 在 $ git commit 之后无法运行 gpg

转载 作者:行者123 更新时间:2023-12-05 04:00:42 29 4
gpt4 key购买 nike

我正在提交我的 GIT 存储库,但终端显示了一些问题。

在我键入 $ git commit 终端显示编辑器后,我必须取消注释行 where is Initial commit 所以我在离开编辑器时完成它,我键入 : wq,终端让我回到默认屏幕并显示此错误

error: cannot run gpg: No such file or directory
error: gpg failed to sign the data
fatal: failed to write commit object

$ git status 我有以下内容

$ git status
On branch master

No commits yet

Changes to be committed:
(use "git rm --cached <file>..." to unstage)

new file: app.js
new file: index.html

存储库已创建,所有文件都被TRACKED并且无法提交文件。

我是初学者,对于一些问题感到抱歉。

最佳答案

该错误告诉您,当试图执行 gpg 时,找不到该程序,因此,如果您需要 set up gpg .完成后,您将需要找出哪些是同时具有公钥和私钥的 GPG key :

gpg --list-secret-keys --keyid-format LONG

从您看到的 key 中,选择您打算使用并运行的 key

git config --global user.signingkey <yourkey>

在这里阅读更多:https://help.github.com/en/articles/telling-git-about-your-signing-key

关于Git - 在 $ git commit 之后无法运行 gpg,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56001308/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com