簡體   English   中英

僅使用 git-crypt unlock 解密某些文件而不是整個 repo

[英]Descrypt only some files with git-crypt unlock and not the entire repo

我正在使用git-cryptgit目錄上執行稀疏結帳。

一個普通的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 的多個密鑰,每個稀疏結賬的密鑰和整體加密的另一個密鑰。
文檔: https : //github.com/AGWA/git-crypt/blob/master/doc/multiple_keys.md
替代解決方案和我的信息來源: https : //github.com/AGWA/git-crypt/issues/155
目前最好的解決方案是使用多個鍵。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM