[英]How Can I Sign Commit With Gpg In Deepin Linux ( Zero To Hero )
我想在 linux 中用 gpg 签名提交,在 windows 中我可以签名,但在 linux 中我有问题。 我在stackoverflow和github中搜索了这个错误,但都不能解决我的问题。
Gpg 错误
error: gpg failed to sign the data
fatal: failed to write commit object
.gitconfig
[user]
signingkey = 18BCF98498084997
name = Ali Azmoodeh
email = treeroot.ir@gmail.com
[commit]
gpgsign = true
[gpg]
program = gpg2
我使用 clion ide 提交我的项目
输入
git -c credential.helper= -c core.quotepath=false -c log.showSignature=false add --ignore-errors -A -f -- .idea/.gitignore CMakeLists.txt .gitignore .idea/first.iml .idea/modules.xml .idea/misc.xml main.cpp
下一个
git -c credential.helper= -c core.quotepath=false -c log.showSignature=false commit -F /tmp/git-commit-msg-.txt --
Output
error: gpg failed to sign the data
fatal: failed to write commit object
然后我运行这个命令
gpg --status-fd=2 -bsau 18BCF98498084997
Output
gpg: skipped "18BCF98498084997": No secret key
[GNUPG:] INV_SGNR 9 18BCF98498084997
[GNUPG:] FAILURE sign 17
gpg: signing failed: No secret key
所以,我在 clion Setting> Git> Configure GPG Key 上打开这个位置
错误
Cant find suitable private key
按照此链接上的说明进行操作。 CLion 似乎无法为指定的公钥找到合适的私钥。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.