Vagrant 厨师属性不会被克服

Vagrant 厨师属性不会被克服,vagrant,chef-infra,chef-recipe,vagrantfile,chef-solo,Vagrant,Chef Infra,Chef Recipe,Vagrantfile,Chef Solo,我正在运行一个依赖于多个菜谱的菜谱,其中一个试图克隆github repo,并在attributes/fair.rb()中将url作为其菜谱中的一个属性: 我需要克服这个属性,以提供https端点,而不是SSH,因此在我的食谱中,我创建attributes/fair.rb并写下: override['openresty']['fair']['url'] = 'https://github.com/gnosek/nginx-upstream-fair.git' 但当我使用vagrant运行che

我正在运行一个依赖于多个菜谱的菜谱,其中一个试图克隆github repo,并在attributes/fair.rb()中将url作为其菜谱中的一个属性:

我需要克服这个属性,以提供https端点,而不是SSH,因此在我的食谱中,我创建attributes/fair.rb并写下:

override['openresty']['fair']['url'] = 'https://github.com/gnosek/nginx-upstream-fair.git'
但当我使用vagrant运行chef solo时,它失败如下:

Mixlib::ShellOut::ShellCommandFailed
==> default:     ------------------------------------
==> default:     Expected process to exit with [0], but received '128'
==> default:     ---- Begin output of git ls-remote "git://github.com/gnosek/nginx-upstream-fair.git" "master*" ----
==> default:     STDOUT: 
==> default:     STDERR: fatal: unable to connect to github.com:
==> default:     github.com[0: 192.30.252.131]: errno=Connection timed out
==> default:     ---- End output of git ls-remote "git://github.com/gnosek/nginx-upstream-fair.git" "master*" ----
==> default:     Ran git ls-remote "git://github.com/gnosek/nginx-upstream-fair.git" "master*" returned 128
==> default:     
==> default:     Resource Declaration:
==> default:     ---------------------
==> default:     # In /tmp/vagrant-chef/97b7f5ef6e972aa934bfb7ea6a5db3bb/cookbooks/openresty/recipes/fair_module.rb
==> default:     
==> default:      26: git module_path do
==> default:      27:   repository node['openresty']['fair']['url']
==> default:      28:   reference 'master'
==> default:      29:   action :checkout
==> default:      30:   not_if { ::File.exists?(module_path) }
==> default:      31: end
==> default:      32: 
==> default:     
==> default:     Compiled Resource:
==> default:     ------------------
==> default:     # Declared in /tmp/vagrant-chef/97b7f5ef6e972aa934bfb7ea6a5db3bb/cookbooks/openresty/recipes/fair_module.rb:26:in `from_file'
==> default:     
==> default:     git("/var/chef/cache/nginx-upstream-fair") do
==> default:       action [:checkout]
==> default:       retries 0
==> default:       retry_delay 2
==> default:       default_guard_interpreter :default
==> default:       destination "/var/chef/cache/nginx-upstream-fair"
==> default:       enable_checkout true
==> default:       revision "master"
==> default:       remote "origin"
==> default:       checkout_branch "deploy"
==> default:       declared_type :git
==> default:       cookbook_name :openresty
==> default:       recipe_name "fair_module"
==> default:       repository "git://github.com/gnosek/nginx-upstream-fair.git"
==> default:       not_if { #code block }
==> default:     end



Ran git ls-remote "git://github.com/gnosek/nginx-upstream-fair.git" "master*" returned 128
==> default: [2016-02-23T01:03:00+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)

如您所见,出于某种原因,仍然使用ssh端点。知道为什么吗?

在openresty食谱的包装中,确保它依赖于openresty的
元数据.rb
。这将确保以正确的顺序加载内容。

运行列表是否包含覆盖属性的食谱?
Mixlib::ShellOut::ShellCommandFailed
==> default:     ------------------------------------
==> default:     Expected process to exit with [0], but received '128'
==> default:     ---- Begin output of git ls-remote "git://github.com/gnosek/nginx-upstream-fair.git" "master*" ----
==> default:     STDOUT: 
==> default:     STDERR: fatal: unable to connect to github.com:
==> default:     github.com[0: 192.30.252.131]: errno=Connection timed out
==> default:     ---- End output of git ls-remote "git://github.com/gnosek/nginx-upstream-fair.git" "master*" ----
==> default:     Ran git ls-remote "git://github.com/gnosek/nginx-upstream-fair.git" "master*" returned 128
==> default:     
==> default:     Resource Declaration:
==> default:     ---------------------
==> default:     # In /tmp/vagrant-chef/97b7f5ef6e972aa934bfb7ea6a5db3bb/cookbooks/openresty/recipes/fair_module.rb
==> default:     
==> default:      26: git module_path do
==> default:      27:   repository node['openresty']['fair']['url']
==> default:      28:   reference 'master'
==> default:      29:   action :checkout
==> default:      30:   not_if { ::File.exists?(module_path) }
==> default:      31: end
==> default:      32: 
==> default:     
==> default:     Compiled Resource:
==> default:     ------------------
==> default:     # Declared in /tmp/vagrant-chef/97b7f5ef6e972aa934bfb7ea6a5db3bb/cookbooks/openresty/recipes/fair_module.rb:26:in `from_file'
==> default:     
==> default:     git("/var/chef/cache/nginx-upstream-fair") do
==> default:       action [:checkout]
==> default:       retries 0
==> default:       retry_delay 2
==> default:       default_guard_interpreter :default
==> default:       destination "/var/chef/cache/nginx-upstream-fair"
==> default:       enable_checkout true
==> default:       revision "master"
==> default:       remote "origin"
==> default:       checkout_branch "deploy"
==> default:       declared_type :git
==> default:       cookbook_name :openresty
==> default:       recipe_name "fair_module"
==> default:       repository "git://github.com/gnosek/nginx-upstream-fair.git"
==> default:       not_if { #code block }
==> default:     end



Ran git ls-remote "git://github.com/gnosek/nginx-upstream-fair.git" "master*" returned 128
==> default: [2016-02-23T01:03:00+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)