GitHub GPG 密钥的 public URL 是什么
What is the public URL for the GitHub GPG keys
是否有用于检索用户 gpg public 密钥的简单端点?
对于 SSH 密钥,github.com/<username>.keys
,是否有类似的 gpg 密钥?
相关:What is the public URL for the Github public keys
您可以尝试使用 GitHub API for GPG Keys:
List GPG keys for a user
GET /users/:username/gpg_keys
Lists the GPG keys for a user. This information is accessible by anyone.
weiji14 proposes :
You can get the keys via the command line using
curl https://api.github.com/users/<username>/gpg_keys
自 2021 年 10 月以来 GitHub CLI gh
2.2.0, you also have gh gpg-key list
:
gh gpg-key list [flags]
github.com/<username>.gpg
也有效,至少在 GHE 中是这样,我还没有在 public github
上验证
如果您不想使用API,因为您不想处理返回的数据,您可以从以下位置获取原始密钥:
curl https://github.com/<username>.gpg
输出可以直接用于导入。
$ curl https://github.com/web-flow.gpg | gpg --import
是否有用于检索用户 gpg public 密钥的简单端点?
对于 SSH 密钥,github.com/<username>.keys
,是否有类似的 gpg 密钥?
相关:What is the public URL for the Github public keys
您可以尝试使用 GitHub API for GPG Keys:
List GPG keys for a user
GET /users/:username/gpg_keys
Lists the GPG keys for a user. This information is accessible by anyone.
weiji14 proposes
You can get the keys via the command line using
curl https://api.github.com/users/<username>/gpg_keys
自 2021 年 10 月以来 GitHub CLI gh
2.2.0, you also have gh gpg-key list
:
gh gpg-key list [flags]
github.com/<username>.gpg
也有效,至少在 GHE 中是这样,我还没有在 public github
如果您不想使用API,因为您不想处理返回的数据,您可以从以下位置获取原始密钥:
curl https://github.com/<username>.gpg
输出可以直接用于导入。
$ curl https://github.com/web-flow.gpg | gpg --import