- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在设置一台新机器,并且更愿意使用 keystore 进行各种 pgp 事件,例如签名提交。我可以运行这样的命令
$ keybase pgp sign -m foo > x
$ gpg --verify x 2>&1 | grep -oF 'Good signature'
Good signature
我可以直接使用 gpg 进行签名,但让 keybase 管理该东西会很方便。那么我可以以某种方式让 git 使用 keybase 吗?
Git configuration似乎没有办法自定义用于签署提交的 gpg 命令。您所能做的就是提供 key 。有什么办法可以做到吗?
最佳答案
感谢 Xavier's answer 中的链接我了解到我可以使用 gpg.program 配置覆盖 gpg 程序:
git config --global gpg.program /path/to/something
所以我可以用它来编写一个围绕键库的包装器。
但事实证明,git 对于某物
是什么非常挑剔。 Git expects to partially parse由 --fd-status
标志产生的输出,这会导致 gpg
输出 special status codes在备用文件句柄处。
幸运的是,至少在我的第一遍中,git 不会解析 gpg 生成的所有内容,因此我能够模拟它。 Here's a gist with a functional wrapper ,这就是它的核心内容:
# Copy the commit message from stdin to a file.
d=$(mktmp -d "${TMPDIR:-/tmp}/gitsig.XXXXXXXXX")
cat > "$d/commit.msg"
# Have Keybase write the signature to another file.
keybase pgp sign --detached \
--key "$1" \
--infile "$d/commit.msg" \
--outfile "$d/commit.sig"
# Have gpg verify the signature right away.
# Capture its status in a file.
gpg --verify --status-fd=2 \
"$d/commit.sig" "$d/commit.msg" \
> /dev/null 2> "$d/gpgstatus.txt"
# Copy the KEY_CONSIDERED lines to stderr. Git wants that.
grep '^\[GNUPG:\] KEY_CONSIDERED' "$d/gpgstatus.txt" >&2
# Produce a minimal SIG_CREATED line to stderr. Git also wants that.
printf '[GNUPG:] SIG_CREATED ' >&2
关于git - 我可以使用 keybase.io 签署 git 提交吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58442313/
我有这个文件 http://pastebin.com/pH4Pk0sf没有扩展名,它可能是 COBOL,因为它托管的计算机使用 BASIC、COBOL 和一种叫做“KEY BASIC”的东西……我不明
我正在设置一台新机器,并且更愿意使用 keystore 进行各种 pgp 事件,例如签名提交。我可以运行这样的命令 $ keybase pgp sign -m foo > x $ gpg --veri
我有一个在机器上运行的 keybase 客户端,但我希望能够从容器内部推送提交。但是,keybase 的工作方式与 git 本身略有不同。它提供了一个这样的 git 'url':keybase://p
我正在使用 keybase.io API - 试图从 javascript 驱动它。登录是一个两步过程。第二步详见 https://keybase.io/docs/api/1.0/call/login
我需要安装 keystore ,并且按照 official linux download page 上提供的说明进行操作。 . 我执行了以下命令: curl -O https://prerelease
我是一名优秀的程序员,十分优秀!