9

Linux 和 MacOS 存在 git-crypt 指令,但对于 Windows,这些指令似乎被省略了。如何在 Windows 上安装 Git-crypt?

4

6 回答 6

18

还有其他方法,但我喜欢 msys2:

  1. 安装 msys2:

    http://www.msys2.org/

  2. 打开一个 msys2 终端。然后 ...

  3. 按照此处的说明安装 g++ for windows:

    https://github.com/orlp/dev-on-windows/wiki/Installing-GCC--&-MSYS2

  4. 确保 /mingw64/bin 在您的路径中。(例如哪个 g++)

  5. git clone git@github.com:AGWA/git-crypt

  6. cd git-crypt

  7. 使 LDFLAGS="-static-libstdc++ -static -lcrypto -lws2_32"

于 2018-01-30T20:09:22.390 回答
4

我不相信提到的适用于 Windows 的 Repository git crypt 。

我终于设法自己构建了 git-crypt。这两个二进制文件之间的大小差异很大。

我的自编译版本大约为 370 kb,而 GitHub 上的 One 为 5.7 Mb。

感谢您的回答竖起大拇指

于 2020-10-07T22:34:01.927 回答
4

使用 msys2,您可以:-

pacman -S git-crypt

无需构建即可安装。

于 2021-09-28T18:17:35.207 回答
1

对于 Windows 10,有一个替代方案可以使用 WSL(适用于 Linux 的 Windows 子系统)让事情变得更容易一些。这将避免编译任何东西的需要。

如果您没有启用 WSL,请参阅Microsoft 文档指南。我还建议从 Microsoft Store 应用程序安装最新的 LTS 版本的 Ubuntu(任何版本的 Ubuntu 都可以)。

安装 Git 地穴

获得 Ubuntu for WSL 的工作副本后,打开它并运行以下命令。

sudo apt-get update
sudo apt-get install git-crypt gnupg

使用 Git 地穴

现在你需要做的就是通过在 Ubuntu 中访问你的 Windows 文件/mnt/。然后,您可以在 WSL 中照常使用 git-crypt。

于 2021-08-25T16:26:18.690 回答
1

查看适用于 Windows 的 git crypt。考虑您是否信任来自互联网的未签名文件(请记住 git crypt 本身是未签名的,您可能还没有查看源代码)

于 2020-09-08T11:49:25.937 回答
1

我已经从这里下载了 git-crypt.exe并将其放在 C:\Program Files\Git\cmd\git-crypt.exe 中!这解决了我的问题!

于 2020-10-18T23:47:54.073 回答