AGWA / AGWA/git-crypt

Confused about the underlying encryption workflow. Can you add some documentation?

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

描述

#Hi, I'm trying to understand how git-crypt actually encrypts and decrypts files. I have 2 questions:

1. after calling `git-crypt init -k FOO` there is no .git-crypt directory yet, but I see the FOO key in `.git/git-crypt/keys`. I have the impression that git-crypt will (eventually) encrypt my files with the .git/git-crypt/keys/FOO key, but that I can optionally protect the FOO key by calling `git-crypt add-gpg-user -k FOO MY_GPG_USER_ID`. Is that correct? This means that there are 2 different keys in play: MY_GPG_USER_ID is the gpg-key that protects the FOO key, right?

2. Alternatively, I can export the .git/git-crypt/keys/FOO key (which simply means making a copy of this file), and then any collaborator can use it in a call to `git-crypt unlock /path/to/key`. If the collaborator copies the exported key to their own `.git/git-crypt/keys` directory (instead of specifying it in the call to `git-crypt unlock`), will that work too?

Imho it would help a lot to document these basic mechanism underlying git-crypt. For some reason, the sentence that confused me the most was "Share the repository with others (or with yourself) using GPG" (it somehow gave me the impression that the GPG key itself was used for the encryption of files in the repository).

ps I would also document the global gpg.program git option

貢獻指南

開啟貢獻指南

評估

這個 Issue 還沒有評估資料。

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

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