now-im
30 January 2021 19:10
1
I can’t sign my GPG commits no matter what. I have tried every method possible, same output again and again.
git commit -m "..."
error: gpg failed to sign the data
fatal: failed to write commit object
Most of the search yielded this command export GPG_TTY=$(tty)
which doesn’t work for me.
However, echo "test" | gpg --clearsign
works. There is no valuable debug information that I can work it. Kindly help!
Strit
1 February 2021 14:58
3
What shell are you working in?
I had this issue when I was using fish, but good old bash worked just fine.
1 Like
now-im
1 February 2021 17:23
4
credential.helper=cache
user.email=[My Mail]
user.name=[My User Name]
user.signningkey=[My Key]
commit.gpgsign=true
gpg.program=gpg
core.repositoryformatversion=0
core.filemode=true
core.bare=false
core.logallrefupdates=true
remote.origin.url=git@[Git Repo].git
remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
branch.main.remote=origin
branch.main.merge=refs/heads/main
Strit:
What shell are you working in?
I had this issue when I was using fish, but good old bash worked just fine.
Zsh and Oh-My-Zsh, with gpg-agent
plugin on. Tried with bash not working.
Strit
1 February 2021 17:27
5
Hm. Pretty sure that export command should have done it with bash…
now-im
1 February 2021 17:37
6
I tried that too. Same error. Did you enable any systemd process?
Fabby
1 February 2021 18:54
7
can you open bash
and execute:
git config --global gpg.program gpg2
and try again? (also in bash
)
I’m not on `zsh so cannot test for you but if the above works try it there as well.
now-im
1 February 2021 19:14
8
Tried in both. Same result. Is there any way to debug? Like specific error?
Fabby
2 February 2021 08:43
9
That’s my 0,02€… No further ideas, sorry!
1 Like
I have solved it myself. Completely Removed folder:
~/.gnupg
After that generated a new GPG key and that somehow solved the problem.
system
Closed
4 April 2021 14:20
12
This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.