git-crypt icon indicating copy to clipboard operation
git-crypt copied to clipboard

unlock only possible via file

Open basz opened this issue 8 years ago • 3 comments

would it be an idea to be able to encrypt via environment variables?

git-crypt unlock $GITCRYPT_SYMETRIC_KEY

Now that gitlab-ci is able properly secure these, "Secret Variables; These variables will be set to environment by the runner. So you can use them for passwords, secret keys or whatever you want."

Now, I store them as base64 encoded in the var

echo $GITCRYPT_SYMETRICKEY_PATH > .git-crypt-base64.key && \ 
openssl base64 -d -in .git-crypt-base64.key -out .git-crypt.key && \
git-crypt unlock .git-crypt.key \
&& rm .git-crypt*.key

basz avatar Apr 24 '17 13:04 basz

Would this work:

git-crypt unlock <(echo $GITCRYPT_SYMETRIC_KEY | base64 --decode)

aaronjensen avatar Jun 11 '17 20:06 aaronjensen

@aaronjensen could you help me to achieve this using windows powershell?

IvanSorokin avatar Oct 09 '19 13:10 IvanSorokin

@IvanSorokin No, I'm sorry. You'll need to talk to someone who is proficient with powershell, which I am not.

aaronjensen avatar Oct 09 '19 16:10 aaronjensen