當我做git commit -a -S -m "Commit Message"
,我得到這個錯誤:Git不會問我的GPG密碼和失敗,我的承諾
You need a passphrase to unlock the secret key for
user: "Username (Gpg Key) <email-id>"
2048-bit RSA key, ID 2487BE7C, created 2016-10-03
error: gpg failed to sign the data
fatal: failed to write commit object
不過,它甚至不要求/提示我密碼時,我提交。那麼,在使用gpg的-S
標誌時,如何以及在哪裏輸入密碼?
確定GPG可以讀取輸入?如果stdin被關閉,你會看到上面的錯誤信息。如果git命令沒有在交互式shell中運行,那麼您可能需要運行gpg-agent才能處理密碼輸入。 –
@ G.Sliepen可以告訴你如何啓動它? – Dawny33