you may totally ignore complicated gpg manuals, but you must understand how
git-cryptoperates.
gpg2.2+ uses AES256 by default, so your secrets are fully depend on the passphrase you are going to use.
πππ
Β‘ instructions are intentionally provided for empty repository, otherwise it cannot be guaranteed that files you are going to encrypt haven't been leaked to the repo in previous commits !
mkdir encrypted-repo && cd encrypted-repo
git init && git-crypt init
curl --user GITHUB_NAME https://api.github.com/user/repos --data '{ "name": "encrypted-repo" }' && \
git remote add origin https://github.com/GITHUB_NAME/encrypted-repo.gitgit-crypt export-key -- - | gpg --symmetric --armor --output local.key.ascecho "secretfile filter=git-crypt diff=git-crypt" >> .gitattributes
echo "secretfile2 filter=git-crypt diff=git-crypt" >> .gitattributesgit add local.key.asc .gitattributes .gitignore
git commit --message="Config: git-crypt settings"
git push --set-upstream origin masterFollow your usual git workflow, git-crypt will take care of transparent encryption of selected files.
When you need the new file to be encrypted, add it to .gitattributes as stated in Add files which need to be encrypted to .gitattributes.
πππ
‘‘‘ Do it before adding withgit addotherwise non-encrypted file will be committed & pushed to the Internet !!!
git clone https://github.com/GITHUB_NAME/encrypted-repo.git && cd encrypted-repogpg --decrypt local.key.asc | git-crypt unlock -