Skip to content

Commit 3e159e7

Browse files
authored
Add the terminal pin-entry instructions to the contributor documentation (#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 <ddelnano@pixielabs.ai>
1 parent b0e632d commit 3e159e7

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

CONTRIBUTING.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,3 +133,17 @@ Use your real name (sorry, no pseudonyms or anonymous contributions.)
133133
##### Commit Signature Verification
134134
135135
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).
136+
137+
##### Setup pinentry-tty to handle headless environments
138+
139+
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.
140+
141+
```
142+
echo "pinentry-program $(which pinentry-tty)" >> ~/.gnupg/gpg-agent.conf
143+
echo "export GPG_TTY=\$(tty)" >> ~/.zshrc
144+
echo "export GPG_TTY=\$(tty)" >> ~/.bashrc
145+
export GPG_TTY=$(tty)
146+
gpg-connect-agent reloadagent /bye
147+
```
148+
149+
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 commit comments

Comments
 (0)