我在我的厨师食谱中运行以下远程文件命令。我无法让它使用代理。 git命令将使用代理,所以其他任何东西,但在使用remote file
remote_file "Fetch the latest ca-bundle" do
source "http://curl.haxx.se/ca/cacert.pem"
path "/opt/local/etc/certs/cacert.pem"
owner "git"
group "git"
mode 0755
action :create
end
错误:
Error connecting to http://curl.haxx.se/ca/cacert.pem - getaddrinfo: Name or service not known
我有以下代理
设置的env变种HTTP_PROXY
HTTPS_PROXY
HTTP_PROXY
https_proxy
有没有办法在命令中定义代理?
答案 0 :(得分:1)
您需要在client.rb
:
# HTTP for environment behind firewall
# http://docs.opscode.com/config.html
# solo.rb and client.rb can use the same http_proxy settings
http_proxy "http://proxy.company.com:3128"
http_proxy_user "username"
http_proxy_pass "password"