Last active
February 28, 2022 14:19
-
-
Save zheileman/96d5046347340dcec591bcabc0d5acd6 to your computer and use it in GitHub Desktop.
Git-crypt and GPG stuff
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# List my keys: | |
gpg --list-keys | |
# Search and import a key: | |
gpg --search-keys [email or key ID] | |
# Trust a key | |
gpg --edit-key ID | |
trust | |
5 = I trust ultimately | |
y | |
quit | |
# Install | |
brew install git-crypt | |
# git-cryp init repository (only NEW repos) | |
cd repo | |
git-crypt init | |
# Add a key to the repo: | |
git-crypt add-gpg-user [email or key ID] | |
# After cloning a repository with encrypted files, unlock with with GPG: | |
git-crypt unlock | |
# Distributing a key to a public server | |
gpg --keyserver pgp.mit.edu --send-key [email or key ID] | |
gpg --keyserver pool.sks-keyservers.net --send-key [email or key ID] | |
# NOTE: If you get errors with the keyserver, try another one! for example: keyserver.ubuntu.com or keys.openpgp.org |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment