我正在使用git-crypt
的git
目录上执行稀疏签出。
一个正常的git clone
接一个正常的git-crypt unlock
。
由于我正在运行sparse
签出,我也想执行部分git-crypt unlock
跑后
g sparse-checkout init
g sparse-checkout add <dir1>
g checkout master
g sparse-checkout add <dir2>
g checkout master
注意:g sparse checkout <dir1> <dir2
后面跟着g checkout master
不起作用因为它似乎只获取<dir2
>
我运行git-crypt unlock
然而,这失败了,因为它吐出了大量的错误,如
error: pathspec 'path/to/some/other/encrypted/file/not/included/in/my/sparse/checkout' did not match any file(s) known to git
有什么建议如何处理这个问题吗?这个问题没有直接的解决办法。
可以使用git crypt中的多个密钥,每个稀疏签出一个密钥,另一个密钥用于整体加密。
Docs: https://github.com/AGWA/git-crypt/blob/master/doc/multiple_keys.md
替代解决方案和我的信息来源:https://github.com/AGWA/git-crypt/issues/155
目前最好的解决方案是使用多个密钥。