Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to manually decrypt a file encrypted via git crypt

I'm using a CI build that downloads a zip archive from github. At build time, I need to decrypt a file that has been encrypted with git-crypt using gpg. However, the CI build cannot decrypt the files because it is not a cloned directory tree and thus I cannot run 'git crypt unlock'.

I see the .git-crypt tree, but what are the manual steps to gpg to decrypt a file?

like image 433
SenseDeep Avatar asked Oct 13 '16 18:10

SenseDeep


1 Answers

Assuming you have the GPG key that the directory was encrypted with, just do the following:

cd encrypted-directory
git init
git-crypt unlock gpg.key
like image 146
Dominic Cerisano Avatar answered Oct 01 '22 03:10

Dominic Cerisano