-
Notifications
You must be signed in to change notification settings - Fork 486
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
Add git-crypt merge driver to support secret files merging. #107
Conversation
…anded by git .gitattribute documentation. Add git-crypt merge driver to support secret files merging.
Any movement on this PR? I just got hit by the unfortunate UX while rebasing/merging. This may fix it right? @shlomosh should this make merge and rebase work like it does with every other file? |
I tried this pr, but it did not solve this issue, any idea why? #140 |
@AGWA any chance this would get merged in? |
I love git-crypt, but encrypting config files is a nightmare due to the inability to merge changes. Just vocalizing my support for a feature that fixes that. |
I am along time For the new projects I'm looking at keeping significant amounts of content that will be edited in parallel where half of it is copyrighted and half of it will be public. Rather than just making CI builds public I'd like to make the entire repository public and just lock down the files that are for some-eyes-only. If |
@amoffat Just a tip: The best architecture I've found for this is to split config files into private and public bits. Most of the time 95% of the content of config files can be unencrypted, usually only a few keys are sensitive (deploy keys, passwords, private URLs, etc.). Often there is a way to import files so that you can put just the one or two sensitive keys in an encrypted file and import it into the unencrypted config. You can often even do this programatically to set different values if the encrypted versions are not available. In the cases where the native config syntax doesn't have a way to handle this it's usually trivial to make merging the sources part of a build or init script. |
You can do something similar with the https://github.com/krish7919/git-crypt-merge-tool (disclaimer, I wrote it). Our use-case is to encrypt a file that is changed on probably every commit we make to the repo, and it works just fine. |
The worse for me is that regardless of wether we are modifying encrypted
files or not, merging them or not - we can’t `rebase origin/master` without
committing, locking then unlocking. Huge pain in big repositories.
|
I'm curious why this PR has changed |
As recommended by gitattributes(5): > For best results, clean should not alter its output further if it is > run twice ("clean->clean" should be equivalent to "clean"), and > multiple smudge commands should not alter clean's output > ("smudge->smudge->clean" should be equivalent to "clean"). I've extracted this change from AGWA#107. Co-Authored-By: Shlomo Shachar <shlomo.shachar@binatix.com>
As recommended by gitattributes(5): > For best results, clean should not alter its output further if it is > run twice ("clean->clean" should be equivalent to "clean"), and > multiple smudge commands should not alter clean's output > ("smudge->smudge->clean" should be equivalent to "clean"). I've extracted this change from AGWA#107. Co-Authored-By: obiasBora <shlomo.shachar@binatix.com>
As recommended by gitattributes(5): > For best results, clean should not alter its output further if it is > run twice ("clean->clean" should be equivalent to "clean"), and > multiple smudge commands should not alter clean's output > ("smudge->smudge->clean" should be equivalent to "clean"). I've extracted this change from AGWA#107. Co-Authored-By: shlomosh <shlomo.shachar@binatix.com>
As recommended by gitattributes(5): > For best results, clean should not alter its output further if it is > run twice ("clean->clean" should be equivalent to "clean"), and > multiple smudge commands should not alter clean's output > ("smudge->smudge->clean" should be equivalent to "clean"). I've extracted this change from AGWA#107. Co-Authored-By: Shlomo Shachar <shlomosh@users.noreply.github.com>
As recommended by gitattributes(5): > For best results, clean should not alter its output further if it is > run twice ("clean->clean" should be equivalent to "clean"), and > multiple smudge commands should not alter clean's output > ("smudge->smudge->clean" should be equivalent to "clean"). I've extracted this change from AGWA#107. Co-Authored-By: Shlomo Shachar <shlomo.shachar@binatix.com>
This is a preparation for the merge command. I've extracted this change from AGWA#107. Co-Authored-By: Shlomo Shachar <shlomo.shachar@binatix.com>
This commit is based on AGWA#107. Co-Authored-By: Shlomo Shachar <shlomo.shachar@binatix.com>
Superseded by #180. |
Add git-crypt merge driver to support secret files merging.
Update clean operation to not alter output when it run multiple times, to match recommended behaviour (https://git-scm.com/docs/gitattributes) -