Questions tagged [git-crypt]

git-crypt enables encryption and decryption of files in a git repository. Use this tag for questions related to the usage of git-crypt.

git-crypt enables transparent encryption and decryption of files in a git repository. Files which you choose to protect are encrypted when committed, and decrypted when checked out. git-crypt lets you freely share a repository containing a mix of public and private content. git-crypt gracefully degrades, so developers without the secret key can still clone and commit to a repository with encrypted files. This lets you store your secret material (such as keys or passwords) in the same repository as your code, without requiring you to lock down your entire repository. (Source)

git-crypt was written by Andrew Ayer (agwa@andrewayer.name). For more information, see https://www.agwa.name/projects/git-crypt.

23 questions
11
votes
9 answers

How to install Git-crypt on Windows?

The git-crypt instructions exist for Linux and MacOS, but for Windows these seem to be omitted. How to install Git-crypt on Windows?
Bhati
  • 129
  • 1
  • 1
  • 4
6
votes
1 answer

GitKraken interoperability with git-crypt

git-crypt works wonderfully when using git CLI. I have set everything up appropriately for git-crypt (.gitattributes). After creating/editing a file I want encrypted I perform: git add . The files have been staged and now I perform: git commit -m…
Chris Wolcott
  • 302
  • 1
  • 3
  • 9
6
votes
2 answers

How to change git-crypt key

I forked a repo using git-crypt and I need to update the git-crypt key so that the upstream git-crypt key can't decrypt the new repo. The git-crypt help documentation and README don't appear to explain how to change a git-crypt key. I tried various…
JDiMatteo
  • 12,022
  • 5
  • 54
  • 65
5
votes
1 answer

Git-crypt workflow - deployment to multiple servers or circleci/travisci

Trying to understanding the full workflow of a git-crypt based secret keeping solution. The tool itself works pretty nicely when on a dev machine, even scaling to multiple developers seems to work fine. However, it is not clear to me how will this…
JAR.JAR.beans
  • 9,668
  • 4
  • 45
  • 57
4
votes
1 answer

How to encrypt a file and store it on LFS?

I know how to encrypt a file on my repository, via git-crypt: echo "*.crypt.* filter=git-crypt diff=git-crypt" > .gitattributes echo "supersecret info" > somethingTo.crypt.txt git add .gitattributes somethingTo.crypt.txt git crypt status #…
Kamafeather
  • 8,663
  • 14
  • 69
  • 99
3
votes
2 answers

How to unlock git-crypt files during docker build on gitlab ci/cd pipeline

I have a repo with encrypted files, using git-crypt. I have exported the key to a file. Now I am using the default docker image build template on gitlab to build my images. The pipeline works just fine. I just don't know how to "unlock" the files…
Daxcor
  • 115
  • 1
  • 8
3
votes
0 answers

Where should I specify a pinentry program for GnuPG 2.0 and later?

I'm going to introduce git-crypt or git-secret to encrypt the credentials information described in a git repository. This needs GnuPG(GPG) to provide a way of encryption. I'v already installed the following program with…
BrainVader
  • 383
  • 1
  • 3
  • 7
2
votes
0 answers

git merge error "fatal: stash failed" on macos with git-crypt

On macos, using git and git-crypt, no idea whats going wrong and how to debug it: From a feature branch: GIT_TRACE=2 GIT_TRACE_PACK_ACCESS=true GIT_TRACE_SETUP=true GIT_ASKPASS=true git merge master 11:00:47.179302 trace.c:310 setup:…
Thomas Decaux
  • 21,738
  • 2
  • 113
  • 124
2
votes
1 answer

Not able to login to git-crypt because .gnupg/pubring.kbx file messed up

I have messed up .gnupg/pubring.kbx file. I don't have any backup of the .gnupg folder. But still, I have my GPG Public and Private keys. I am unable to unlock git-crypt. When I list the .gnupg folder in my mac, lt lists these files: S.gpg-agent …
Jai Prak
  • 2,855
  • 4
  • 29
  • 37
1
vote
0 answers

using same git crypt key in multiple repo

I had key for Repo:1 I had created another repository and create hello world project and push the changes. Steps : here Copy the key and added to the root project. Add .gitattributes file with [file pattern] attr1=value1 attr2=value2 git-crypt…
IOSDev
  • 205
  • 2
  • 10
1
vote
1 answer

How to move or copy my git-cryp key to another laptop

I have my git-crypt key in another laptop and I would like to move this one to another one, I haven't seen any documentation related with this process or if it is possible to achieve that, thank you!!
rasilvap
  • 1,771
  • 3
  • 31
  • 70
1
vote
0 answers

git-crypt fails to recognize cloned repository

I have two computers, a desktop and a laptop. I setup gpg and git-crypt on the desktop, and it seems to be working great. I can encrypt and decrypt individual files with gpg, as well as sign git commits on both laptop and desktop. That's working…
Jon Buys
  • 507
  • 5
  • 15
1
vote
0 answers

git-crypt unlock is not working as expected I can't see the plain text

in my project we are using git-crypt to crypt and decrypt some files, but I have already created and added my pub key to the project using gpg --full-generate-key and gpg --export myemail > my_key.pub commands. I don't have any error message in the…
rasilvap
  • 1,771
  • 3
  • 31
  • 70
1
vote
1 answer

Descrypt only some files with git-crypt unlock and not the entire repo

I am performing a sparse checkout on a git dir that uses git-crypt. A normal git clone followed by a git-crypt unlock works. Since I am running a sparse checkout, I would also like to perform a partial git-crypt unlock After running g…
pkaramol
  • 16,451
  • 43
  • 149
  • 324
1
vote
0 answers

how to cherry-pick commit containing encrypted file?

I have one repo with encrypted files. I want to move all of them, including commit history into another repo. I c̶a̶n̶n̶o̶t̶ couldn't figure out very long time a way how to do that. What eventually worked for me is this: git init in old repo…
Martin Mucha
  • 2,385
  • 1
  • 29
  • 49
1
2