Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jirikrepl/771689ef58445ac4f741846d3e7403f8 to your computer and use it in GitHub Desktop.
Save jirikrepl/771689ef58445ac4f741846d3e7403f8 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 pass
# 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