![](/img/trans.png)
[英]How to unlock git-crypt files during docker build on gitlab ci/cd pipeline
[英]Descrypt only some files with git-crypt unlock and not the entire repo
我正在使用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 的多個密鑰,每個稀疏結賬的密鑰和整體加密的另一個密鑰。
文檔: 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.