AGWA / AGWA/git-crypt

Document how to verify something is encrypted

未關閉
#129 4 則留言 7 個 reaction 已指派 0 人 在 GitHub 檢視
主要語言
C++
星號
9.9k
分支
544
PR 合併指標
30 天內沒有已合併 PR

描述

The readme should encourage you to double check if something is encrypted after writing the .gitattributes file.

You can verify the filter is being matching by doing:
```
git check-attr -a --
```

An easier method (assuming you don't have other gitattributes!) I have found is to make sure the hash of the plain file DOES NOT match the hash of the object in the tree:
```
# Make sure these hashes DO NOT MATCH
$ git hash-object secretfile
eedff305e146f749da4253aafc7340845a72cec7
$ cat secretfile | git hash-object --stdin
eedff305e146f749da4253aafc7340845a72cec7 ### YOUR GIT ATTRIBUTE DID NOT WORK, your file is not encrypted
```
If you encrypt the file successfully the hashes will not match:
```
$ git hash-object secretfile
1ced004ffd1578dd783ada1e6ffc8b7c41717800
$ cat secretfile | git hash-object --stdin
eedff305e146f749da4253aafc7340845a72cec7
```

貢獻指南

開啟貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。