Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save frizzr/d2151de1e04fe5edf0f935eafd72e42f to your computer and use it in GitHub Desktop.
Save frizzr/d2151de1e04fe5edf0f935eafd72e42f to your computer and use it in GitHub Desktop.
# configure git credentials manager to work with GPG
# usefull for sessions without GUI
# https://github.com/GitCredentialManager/git-credential-manager
# https://github.com/GitCredentialManager/git-credential-manager/blob/main/docs/credstores.md#gpgpass-compatible-files
# install pass
sudo apt install pass
# generate gpg key pair
gpg --gen-key
# initiate pass with your gpg key pair (ID is very long string)
pass init <gpg-key-pair-id>
# add this to your ~/.bashrc, so you can you can use GPG in your terminal witout GUI
vim ~/.bashrc
export GPG_TTY=$(tty)
# set github password manager to use pass
git config --global credential.credentialStore gpg
# connect via SSH and use device authentication
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment