更新git ppa错误-在Debian上找不到有效的OpenPGP数据

2g32fytz  于 2023-02-07  发布在  Git
关注(0)|答案(1)|浏览(285)
    • bounty将在2天后过期**。回答此问题可获得+50的声望奖励。Ankit正在寻找规范答案

我尝试在Debian 10(buster)机器上更新git版本,遇到了gpg key的问题。

> sudo add-apt-repository ppa:git-core/ppa
 The most current stable version of Git for Ubuntu.

For release candidates, go to https://launchpad.net/~git-core/+archive/candidate .
 More info: https://launchpad.net/~git-core/+archive/ubuntu/ppa
Press [ENTER] to continue or ctrl-c to cancel adding it

gpg: keybox '/tmp/tmpfqaimru3/pubring.gpg' created
gpg: /tmp/tmpfqaimru3/trustdb.gpg: trustdb created
gpg: key A1715D88E1DF1F24: public key "Launchpad PPA for Ubuntu Git Maintainers" imported
gpg: Total number processed: 1
gpg:               imported: 1
gpg: no valid OpenPGP data found.

我也尝试手动添加密钥,但在成功添加密钥后仍然以同样的错误结束。

> sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys A1715D88E1DF1F24
Executing: /tmp/apt-key-gpghome.pwYjc1J0zy/gpg.1.sh --keyserver keyserver.ubuntu.com --recv-keys A1715D88E1DF1F24
gpg: key A1715D88E1DF1F24: public key "Launchpad PPA for Ubuntu Git Maintainers" imported
gpg: Total number processed: 1
gpg:               imported: 1

并且:

> gpg --export  A1715D88E1DF1F24 | sudo apt-key add  -
gpg: WARNING: nothing exported
gpg: no valid OpenPGP data found.

不知道我做错了什么。我也做了几次更新。

> sudo apt-get update
dgiusagp

dgiusagp1#

this issue一样,使用sudo apt-key list检查是否看到过期的密钥
根据您在/etc/apt/sources.list.d/中看到的内容,可以推断出要导入的“gpgkey”的URL。

curl -L https://.../git-core/gpgkey | sudo apt-key add -

相关问题