Problems with git commit autosigning on mac

i have the Problem, that i get a error message sometimes, since i’ve enabled git gpgsign on mac.

Error message

sometime the gpg-agent stucks, so i get the error message:

❯ git commit -m 'Test'
error: gpg failed to sign the data
fatal: failed to write commit object

Quik fix

to quik fix this issue you can kill the gpg-agent.

pkill -9 gpg-agent && export GPG_TTY=$(tty)

General fix

add the fallowing lines to your bashrc.

GPG_TTY=$(tty)
export GPG_TTY

don’t trust me…

I do not know what I am doing, so I cannot take responsibility for the accuracy of the information provided here

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
0hlov3

0hlov3

Passionate DevOps engineer with a preference for Infrastructure as Code, Automation, Kubernetes, Go, Azure- and HetznerCloud.