Git signed commits - How to suppress “You need a passphrase to unlock the secret key…”

后端 未结 2 1415
灰色年华
灰色年华 2020-12-29 05:46

I changed my global Git configuration to sign all commits. I also use gpg-agent so that I don\'t have to type my password every time.

Now every time I make a new com

2条回答
  •  有刺的猬
    2020-12-29 06:22

    This is more a gpg configuration issue than a git one.

    Since you are using an agent, you could as a workaround add no-tty to your gpg.conf.

    echo 'no-tty' >> ~/.gnupg/gpg.conf
    

    (this seems working even better than the --batch option)

提交回复
热议问题