流氓gpg通信被阻止

时间:2015-03-12 12:32:35

标签: vagrant

希望有人可以帮助我。我最近用Jose Diaz-Gonzalez的CakePHP 2.0购买了Rapid Application Development,我一直在努力建立流浪者。

我正在使用最新版本的虚拟盒,流浪汉和厨师,我按照信中的说明操作,我收到以下错误:

==> default: [2015-03-12T07:46:39+00:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
==> default: [2015-03-12T07:46:39+00:00] ERROR: execute[request git key] (/tmp/vagrant-chef/bd885c961fe7ceaf386b7954711e7941/cookbooks/apt/providers/repository.rb line 2) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '2'
==> default: ---- Begin output of gpg --keyserver keyserver.ubuntu.com --recv-keys E1DF1F24 ----
==> default: STDOUT: 
==> default: STDERR: gpg: keyring `/root/.gnupg/secring.gpg' created
==> default: gpg: requesting key E1DF1F24 from hkp server keyserver.ubuntu.com
==> default: gpg: keyserver timed out
==> default: gpg: keyserver receive failed: keyserver error
==> default: ---- End output of gpg --keyserver keyserver.ubuntu.com --recv-keys E1DF1F24 ----
==> default: Ran gpg --keyserver keyserver.ubuntu.com --recv-keys E1DF1F24 returned 2
==> default: [2015-03-12T07:46:39+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)

Chef never successfully completed! Any errors should be visible in the
output above. Please fix your recipes so that they properly complete.

我的堆栈跟踪显示以下内容:

Generated at 2015-03-12 08:06:25 +0000
Mixlib::ShellOut::ShellCommandFailed: execute[request git key] (/tmp/vagrant-chef/bd885c961fe7ceaf386b7954711e7941/cookbooks/apt/providers/repository.rb line 2) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '2'
---- Begin output of gpg --keyserver keyserver.ubuntu.com --recv-keys E1DF1F24 ----
STDOUT:
STDERR: gpg: keyring `/root/.gnupg/secring.gpg' created
gpg: requesting key E1DF1F24 from hkp server keyserver.ubuntu.com
gpg: keyserver timed out
gpg: keyserver receive failed: keyserver error
---- End output of gpg --keyserver keyserver.ubuntu.com --recv-keys E1DF1F24 ----
Ran gpg --keyserver keyserver.ubuntu.com --recv-keys E1DF1F24 returned 2

我已经确定这是由端口11371被我们的公司网络阻止造成的。我已经读过你可以强制gpg使用端口80的地方,但问题是python目录显然是不可访问的,直到" Variant up"跑了。这有点像22,除非有人知道绕过或解决这个问题的方法吗?

1 个答案:

答案 0 :(得分:0)

在Chef cookbook中搜索以下行

command "gpg --keyserver keyserver.ubuntu.com --recv-keys #{new_resource.key}"

并将其更改为

command "gpg --keyserver keyserver.ubuntu.com:80 --recv-keys #{new_resource.key}"