gpg failed to sign the data. Failed to write commit object

不羁岁月 提交于 2019-12-23 14:49:48

问题


I wrongly did sudo install gpg due to passphrase error. Now I am not able to commit anything through intelliJ. I am getting below error:

gpg: skipped "10XXXXXXXXX3892": secret key not available gpg: signing failed: secret key not available error: gpg failed to sign the data fatal: failed to write commit object 
gpg: skipped "MyUpdates": secret key not available gpg: signing failed: secret key not available error: gpg failed to sign the data fatal: failed to write commit object

Here two secret keys are shown "10XXXXXXXXX3892" and "MyUpdates". Is there any way i can get rid of gpg error. How can I uninstall gpg?


回答1:


This reads like a permissions problem. You likely created/installed the keys as another user than IntelliJ is running under. Given you run IntelliJ under your normal user account (which you generally should be doing), take ownership of the GnuPG home directory again:

sudo chown -R $USER:$USER ~/.gnupg

Then make sure you can see the private keys:

gpg --list-secret-keys


来源:https://stackoverflow.com/questions/38780874/gpg-failed-to-sign-the-data-failed-to-write-commit-object

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!