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 摘要。