The git-crypt instructions exist for Linux and MacOS, but for Windows these seem to be omitted. How to install Git-crypt on Windows?
9 Answers
There are other approaches, but I like msys2:
Install msys2:
Open a msys2 terminal. Then ...
Install g++ for windows, following the instructions here:
https://github.com/orlp/dev-on-windows/wiki/Installing-GCC--&-MSYS2
Be sure /mingw64/bin is in your path. (e.g. which g++)
git clone git@github.com:AGWA/git-crypt
cd git-crypt
make LDFLAGS="-static-libstdc++ -static -lcrypto -lws2_32"
-
2I wasn't sure if i was meant to clone and make inside msys2 or in cmd/powershell, but I did it inside a MINGW 64 shell, as cmd/powershell doesn't have 'make' available. I then had to add `C:\msys64\usr\local\bin` to my Path so that the new `git-crypt` executable was available in cmd/powershell. This also made it available to Android studio (which is my use case) – OliverDeLange Mar 11 '20 at 16:11
-
Thanks for these instructions. I was able to follow these and make git-crypt, but then it errors when running with "The code execution cannot proceed because libcrypto-1_1-x64.dll was not found. Reinstalling the program may fix this problem." Follows with the same error for libgcc_s_seh-1.dll and libstdc__-6.dll – leejt489 May 19 '20 at 22:18
-
2In step 5, I had to use HTTPS URL to clone the repo: `git clone https://github.com/AGWA/git-crypt.git` - otherwise git was complaining that permission was denied to clone it. – Alexey Grinko Apr 01 '21 at 10:07
-
Thanks for this excelent description, it worked well. If you want to create a binary with static linked libraries you have to call make with different LDFLAGS: `make LDFLAGS="-static-libstdc++ -static -lcrypto.dll"` Otherwise you have to put the two dlls "libstdc++-6.dll" und "libcrypto-1_1-x64.dll" next to the executable to execute it outside of msys2 – feri Jun 03 '21 at 09:51
I would not trust the Repository git crypt for Windows that was mentioned.
I finally just managed to build git-crypt myself. And the Difference of the Size between this two Binaries is huge.
My self compiled Version is something around 370 kb compared to the 5.7 Mb from the One on GitHub.
Thanks for the Answer Thumbs Up

- 83
- 1
- 5
with msys2 you can:-
pacman -S git-crypt
to install without needing to build it.
Note: The git crypt repo now has windows binaries under releases https://github.com/AGWA/git-crypt/releases/tag/0.7.0

- 126
- 3
Check out git crypt for Windows. Consider whether you trust unsigned files from the internet (keep in mind git crypt itself is unsigned and you likely haven't reviewed the source)

- 110,530
- 99
- 389
- 494
For Windows 10 there is an alternative that should make things a bit easier using WSL (Windows Subsystem for Linux). This will avoid the need to compile anything.
If you do not have WSL enabled see Microsoft docs guide. I would also recommend installing the latest LTS edition of Ubuntu from the Microsoft Store app (any edition of Ubuntu will do).
Install Git Crypt
Once you have a working copy of Ubuntu for WSL, open it and run the following commands.
sudo apt-get update
sudo apt-get install git-crypt gnupg
Use Git Crypt
Now all that you need to do is access your Windows files from within Ubuntu by looking in /mnt/
. Then you can use git-crypt as normal from within WSL.

- 983
- 3
- 16
- 31
As proposed by mikemaccana
IN WINDOWS
I have downloaded git-crypt.exe from here and placed it in the C:\Program Files\Git\cmd\git-crypt.exe ! This solved my issue !

- 11
- 1