-
Notifications
You must be signed in to change notification settings - Fork 7
Closed
Description
Integrate git-crypt into the repository to allow to encrypt specific files using GPG.
git-crypt is a stable and production proven concept that works safely and allows to use a transparent encryption with Git.
snowsaw will use it to encrypt files containing sensitive data like deployment, API or any other kind of secret keys. Another way would be to use Circle CI's environment variables features to make sensitive data available during build time, but using git-crypt ensures that all required project data is stored in the repository and tracked by Git without the need to manually configure CI/CD providers and servers.
Integration Steps
- 1 Add files to
.gitattributesand configurefilteranddiffto usegit-cryptsetup - 2 Initialize
git-cryptfor the repository:git-crypt init(default key) - 3 Add the GPG keys of all core team members keys and CI/CD virtual user:
git-crypt add-gpg-user --trusted --no-commit <ID>(--no-commitflag prevents automatic commit of generated files while--trustedassumes the GPG user IDs are trusted) - 4 Commit the new generated
.git-cryptfolder - 5 Unlock the repository:
git-crypt unlock - 6 Ensure all target files are tracked to be encrypted:
git-crypt status 7 Commit all encrypted target filesNothing to commit yet- 8 Validate the encryption works by locking the repository again:
git-crypt lock
