GitHub/gpg: Difference between revisions
< GitHub
(→gpg) |
(→gpg) |
||
(2 intermediate revisions by the same user not shown) | |||
Line 15: | Line 15: | ||
You will probably get an error about being unable to sign if you are in a remote console, to fix this: <ref>https://stackoverflow.com/questions/51504367/gpg-agent-forwarding-inappropriate-ioctl-for-device</ref> | You will probably get an error about being unable to sign if you are in a remote console, to fix this: <ref>https://stackoverflow.com/questions/51504367/gpg-agent-forwarding-inappropriate-ioctl-for-device</ref> | ||
export GPG_TTY=$(tty) | export GPG_TTY=$(tty) | ||
Cache password in gpg-agent: | |||
echo "" | gpg --clearsign | |||
~/.bashrc | |||
alias gpgpass="echo '' | gpg --clearsign" | |||
If you really hate security, you can remove the passphrase: | If you really hate security, you can remove the passphrase: | ||
Line 22: | Line 28: | ||
then enter empty password twice | then enter empty password twice | ||
then save | then save | ||
== keywords == |
Latest revision as of 21:51, 5 December 2024
gpg
Adding a GPG key to your GitHub account - GitHub Docs https://docs.github.com/en/authentication/managing-commit-signature-verification/adding-a-gpg-key-to-your-github-account
Generate key:
gpg --full-generate-key
List keys to get keyID
gpg --list-keys
Export public key by keyID, and save to Github
gpg --armor --export 3AA5C34371xxx
You will probably get an error about being unable to sign if you are in a remote console, to fix this: [1]
export GPG_TTY=$(tty)
Cache password in gpg-agent:
echo "" | gpg --clearsign
~/.bashrc alias gpgpass="echo | gpg --clearsign"
If you really hate security, you can remove the passphrase:
gpg --edit-key XXX passwd enter password to unlock then enter empty password twice then save