通过代理在Ubuntu上安装Heroku工具包

4
我正在尝试在通过代理连接到互联网的Ubuntu机器上安装Heroku Toolbelt。我对Ubuntu及其设置相当陌生,但我成功地连接到了互联网。仅浏览网页和通过apt-get获取更新似乎都很正常,curl命令也返回了预期结果。
当我尝试在Heroku Toolbelt网站上运行命令时:
wget -qO- https://toolbelt.heroku.com/install-ubuntu.sh | sh

我遇到了一些错误:
me@mypc-vb:~/Documents/stuff$ wget -qO- https://toolbelt.heroku.com/install-ubuntu.sh | sh
This script requires superuser access to install apt packages.
You will be prompted for your password by sudo.
[sudo] password for hsiehbe: 
--2012-11-15 15:09:46--  https://toolbelt.heroku.com/apt/release.key
Resolving toolbelt.heroku.com... failed: Name or service not known.
wget: unable to resolve host address `toolbelt.heroku.com'
gpg: no valid OpenPGP data found.
Ign http://us.archive.ubuntu.com oneiric InRelease
Ign http://security.ubuntu.com oneiric-security InRelease           
Ign http://extras.ubuntu.com oneiric InRelease                       
...
Fetched 12.9 MB in 32s (394 kB/s)                                                                                     
Reading package lists... Done
W: GPG error: http://toolbelt.heroku.com ./ Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY C927EBE00F1B0520
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  foreman heroku libreadline5 libruby1.9.1 ruby1.9.1
Suggested packages:
  ruby1.9.1-examples ri1.9.1 graphviz ruby1.9.1-dev
The following NEW packages will be installed:
  foreman heroku heroku-toolbelt libreadline5 libruby1.9.1 ruby1.9.1
0 upgraded, 6 newly installed, 0 to remove and 27 not upgraded.
Need to get 4,815 kB of archives.
After this operation, 15.9 MB of additional disk space will be used.
WARNING: The following packages cannot be authenticated!
  foreman heroku heroku-toolbelt
E: There are problems and -y was used without --force-yes

最明显的错误可能只是一些小问题。
Resolving toolbelt.heroku.com... failed: Name or service not know.

我漏掉了什么?
1个回答

8

我刚在代理后安装Heroku Toolbelt时也遇到了同样的问题:

问题的核心是这样的:

GPG error: http://toolbelt.heroku.com ./ Release: The following
signatures couldn't be verified because the public key is not
available: NO_PUBKEY C927EBE00F1B0520

你会注意到,下一次运行apt-get update时,你将会收到相同的消息。似乎ubuntu无法获取heroku软件包仓库的公钥。
为了解决这个问题,你可以手动附加公钥,如以下描述所示: http://en.kioskea.net/faq/809-debian-apt-get-no-pubkey-gpg-error
gpg --keyserver pgpkeys.mit.edu --recv-key  C927EBE00F1B0520 
gpg -a --export C927EBE00F1B0520 | sudo apt-key add -

安装脚本运行后,一切都会顺利进行。

请注意,第二个代码块实际上是两个单独的命令,您需要将两个 "C927EBE00F1B0520" 替换为您实际获得的错误。 - electrichead
1
当我运行 gpg 命令时,无法在 pgpkeys.mit.edu 上获取 Heroku 密钥,导致出现“未找到有效的 OpenPGP 数据”错误消息。我从 Heroku 获取了密钥 wget https://toolbelt.heroku.com/apt/release.key,然后使用 sudo apt-key add release.key 添加了该密钥。安装脚本随后成功运行。 - Brendan Cody-Kenny
@McOda 谢谢...我添加了发布密钥,现在它可以工作了。 - Raja Simon

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接