Signing issue with `export GPG_TTY=$(tty)`

Viewed 4209

What I am trying to do

I would like to sign my git commits with a gpg key, I have the line export GPG_TTY=$(tty) in my .zshrc file. I am able create a signed commit when I source my .zshrc.

Issue I am facing

I have found that in vscode integrated terminal (I haven't tried this in a iTerm window) after a while that I will get failed to sign commit, make sure to set email, username. but once I export again it works as expected.

I also downloaded the gpg suite to allow me to still sign commits, and that seems to make this issue go away. but I would prefer it to be a temporary solution while I figure this out.

I'm not sure what would cause the GPG_TTY to "expire".

Current configuration

Im am using a Mac, with zsh, and Powerlevel 10k. (this issue existed before I started using p10k)

Any, and all help is appreciated!!

0 Answers
Related