Skip to content

Commit

Permalink
Add the terminal pin-entry instructions to the contributor documentat…
Browse files Browse the repository at this point in the history
…ion (#1800)

Summary: Add the terminal pin-entry instructions to the contributor
documentation

Relevant Issues: N/A

Type of change: /kind documentation

Test Plan: N/A

Signed-off-by: Dom Del Nano <[email protected]>
  • Loading branch information
ddelnano authored Dec 5, 2023
1 parent b0e632d commit 3e159e7
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,3 +133,17 @@ Use your real name (sorry, no pseudonyms or anonymous contributions.)
##### Commit Signature Verification
All commit signatures must be verified to ensure that commits are coming from a trusted source. To do so, please follow Github's [Signing commits guide](https://docs.github.com/en/authentication/managing-commit-signature-verification/signing-commits).
##### Setup pinentry-tty to handle headless environments
When signing commits, gpg will need your passphrase to unlock the keyring. It usually uses a GUI pinentry program to do so. However on headless environments, this gets messy, so we highly recommend switching gpg to use a tty based pinentry to ease these problems.
```
echo "pinentry-program $(which pinentry-tty)" >> ~/.gnupg/gpg-agent.conf
echo "export GPG_TTY=\$(tty)" >> ~/.zshrc
echo "export GPG_TTY=\$(tty)" >> ~/.bashrc
export GPG_TTY=$(tty)
gpg-connect-agent reloadagent /bye
```
Here we tell `gpg` to use `pinentry-tty` when prompting for a passphrase, and export the current TTY to tell `gpg` which TTY to prompt on.

0 comments on commit 3e159e7

Please sign in to comment.