creamidea / creamidea.github.com

冰糖火箭筒&&蜂蜜甜甜圈
https://creamidea.github.io/
4 stars 4 forks source link

[Git] show error: secret key not available when git sign #21

Open creamidea opened 8 years ago

creamidea commented 8 years ago

I met this problem because I had deleted my private key on my laptop in order to protect my secret. I use gpg2 to solve this problem. Ref: link git config --global gpg.program gpg2

And, I also change the signingkey to my key of sign. You can use gpg2 --edit-key [key-id] to see which key is to sign.

Good luck.

BTW. If you want to sign the previous commit, you can use git --amend --signoff