-
-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
git-crypt #124
Merged
Merged
git-crypt #124
Conversation
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
Contributor
arcticicestudio
commented
Feb 16, 2019
Defined the first files that should be encrypted and ensured to exclude the Git specific `.gitattributes` itself and `.gitignore` files. GH-123
Initialized git-crypt for the repository with `git-crypt init`. Added GPG keys of all core team members and the CI/CD virtual user using `git-crypt add-gpg-user --trusted --no-commit <ID>` (`--no-commit` flag prevents automatic commit of generated files while `--trusted` assumes the GPG user IDs are trusted) GH-123
The files are tracked by git-crypt and transparently encrypted on-the-fly. GH-123
Nord Docs uses git-crypt to encrypt Gatsby environment variables] (1) stored in `.env*` files that are handled by dotenv (2). Another way would be to use Circle CI's environment variables features (3) 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. Unfortunately Netlify currently doesn't provide a way to customize the Docker container configuration so that it is not possible to set up GPG and git-crypt to import the CI/CD GPG secret key, decrypt the files and build the project. An attempted solution was to use Netlify's awesome "Functions" feature (4) to run a function that executes shell commands using the `deploy-building` trigger to set up GPG and git-crypt, but there is no way to ins tall `git-crypt` in the container so this doesn't work. Therefore is is necessary to manually set required environment variables via Netlify's web app UI for build environment variables . - `NORD_DOCS_GOOGLE_UNIVERSAL_ANALYTICS_TRACKING_ID` - Stores the "Google Universal Analytics" tracking ID. References: (1) https://www.gatsbyjs.org/docs/environment-variables (2) https://github.com/motdotla/dotenv (3) https://circleci.com/docs/2.0/env-vars (4) https://www.netlify.com/docs/functions (5) https://www.netlify.com/docs/continuous-deployment/#build-environment-variables GH-123
Codecov Report
@@ Coverage Diff @@
## develop #124 +/- ##
========================================
Coverage 48.99% 48.99%
========================================
Files 239 239
Lines 998 998
Branches 151 151
========================================
Hits 489 489
Misses 509 509
Continue to review full report at Codecov.
|
svengreb
approved these changes
Feb 16, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.