切换到使用子项后,如何在GitHub上验证提交? [英] How do I verify commits on GitHub after I switched to using subkeys?

查看:102
本文介绍了切换到使用子项后,如何在GitHub上验证提交?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Windows主计算机上安装了GnuPG,并创建了主键.那时我很愚蠢,在git中使用主键作为签名键,并将其公钥上传到GitHub.这些提交在GitHub上显示为已验证".

I installed GnuPG on my main Windows computer, and created primary key. I was stupid at that time, and used the primary key as a signing key in git, and uploaded its public key to GitHub. These commits show as Verified on GitHub.

后来我改变了主意,并生成了一个新的子项,将其设置为git的签名项.但是,当我尝试将公共密钥上载到GitHub时,显示密钥已存在且公共密钥已存在".并失败了.GitHub电子邮件,git电子邮件和gpg电子邮件似乎是相同的.

I later changed my mind and generated a new subkey, set it to the signing key for git. However, when I tried to upload the public key to GitHub, it says "Key already exists and Public key already exists" and fails. GitHub email, git email and gpg email seems to be the same.

我需要删除我在GitHub上载的主键的公钥吗?我还需要执行其他任何步骤来使它们通过验证吗?

Do I need to delete the public key for the primary key I uploaded on GitHub? Are there any other steps I need to do to make them Verified?

  • env:Windows 10,gpg 2.2.21,git 2.28.0.windows.1
  • 未验证的GPG密钥ID:13BE71607A63CDF2
  • 已验证的GPG密钥ID:AB61CEE479E4B09D
  • 当我 gpg --armor --export 时,两个公钥看起来都相同.
  • env: windows 10, gpg 2.2.21, git 2.28.0.windows.1
  • Unverified GPG key ID: 13BE71607A63CDF2
  • Verified GPG key ID: AB61CEE479E4B09D
  • When I gpg --armor --export both public keys looked the same.

推荐答案

我解决了此问题,即删除现有密钥并上传新密钥.上载新密钥后,先前的提交仍得到验证.我认为这是因为旧的签名密钥仍然存在.

I solved this be deleting the existing key and uploading the new one. Previous commits were still verified after uploading the new key. I think this is because the old signing key is still present.

完成此操作后,github将在您设置的GPG键部分显示多个子键.

After doing this github will show multiple subkeys in the GPG keys section of your settings.

这篇关于切换到使用子项后,如何在GitHub上验证提交?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆