当前位置:   article > 正文

Debian/Ubuntu 对gpg和apt-key使用代理--报错解决:gpg: keyserver receive failed: Connection timed out

gpg: keyserver receive failed: connection timed out

Debian/Ubuntu 对gpg和apt-key使用代理–报错解决:gpg: keyserver receive failed: Connection timed out

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 40976EAF437D05B5
Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)).
Executing: /tmp/apt-key-gpghome.SLXjdH01xN/gpg.1.sh --keyserver keyserver.ubuntu.com --recv-keys 40976EAF437D05B5

gpg: keyserver receive failed: Connection timed out
  • 1
  • 2
  • 3
  • 4
  • 5

gpg和apt-key使不会直接读取终端中设置的代理,需要单独设置。所以要单独地设置代理 --keyserver-options http-proxy=$http_proxy

sudo apt-key adv --keyserver-options http-proxy=$http_proxy --keyserver keyserver.ubuntu.com --recv-keys 40976EAF437D05B5
  • 1
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/小小林熬夜学编程/article/detail/129303?site
推荐阅读
相关标签
  

闽ICP备14008679号