![添加 ppa repo 并获取密钥签名-没有有效的 OpenPGP 数据-代理问题?](https://linux22.com/image/957207/%E6%B7%BB%E5%8A%A0%20ppa%20repo%20%E5%B9%B6%E8%8E%B7%E5%8F%96%E5%AF%86%E9%92%A5%E7%AD%BE%E5%90%8D-%E6%B2%A1%E6%9C%89%E6%9C%89%E6%95%88%E7%9A%84%20OpenPGP%20%E6%95%B0%E6%8D%AE-%E4%BB%A3%E7%90%86%E9%97%AE%E9%A2%98%EF%BC%9F.png)
我想要获得一个 ppa 密钥签名
我试过
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys A258828C
Executing: gpg --ignore-time-conflict --no-options --no-default-keyring --secret-keyring /etc/apt/secring.gpg --trustdb-name /etc/apt/trustdb.gpg --keyring /etc/apt/trusted.gpg --primary-keyring /etc/apt/trusted.gpg --keyserver keyserver.ubuntu.com --recv-keys A258828C
gpg: requesting key A258828C from hkp server keyserver.ubuntu.com
gpgkeys: HTTP fetch error 7: couldn't connect to host
gpg: no valid OpenPGP data found.
gpg: Total number processed: 0
和
wget -q http://ppa.launchpad.net/panda3d/ppa/ubuntu/dists/lucid/Release.gpg -O- | apt-key add -
gpg: no valid OpenPGP data found
我使用了代理,在 apt.conf 中它配置正确
Acquire::http::Proxy "http://proxy.mycompany.de:3128";
我也尝试设置代理
export http_proxy="proxy.mycompany.de:3128"
export https_proxy="proxy.mycompany.de:3128"
答案1
尝试
export http_proxy=http://proxy.mycompany.de:3128; export https_proxy=$http_proxy
sudo -E apt-key adv --keyserver keyserver.ubuntu.com --recv-keys A258828C
答案2
您忘记使用 sudo 了吗?
如果你这样做了但失败了,也可以尝试这个:
sudo gpg --ignore-time-conflict --no-options --no-default-keyring --secret-keyring /etc/apt/secring.gpg --trustdb-name /etc/apt/trustdb.gpg --keyring /etc/apt/trusted.gpg --primary-keyring /etc/apt/trusted.gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv A258828C
答案3
尝试运行sudo -s
之前
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys A258828C
这对我有用。