R10k Ruby 与锻造厂的连接错误

R10k Ruby connection error to the forge

我不确定为什么 r10k 不安装来自 forge 的一些模块我已经包含了跟踪。如果我尝试使用人偶模块安装手动安装模块并指向我想要的模块,那么它可以正常工作。只是从可以告诉我为什么 r10k 搞砸的人那里寻找一些指导。

INFO     -> Deploying environment /etc/puppet/environments/dev
INFO     -> Environment dev is now at 9d21c16e0627a9e0f7b0b1fb9f00191828664d22
INFO     -> Deploying module /etc/puppet/environments/dev/modules/inifile
ERROR    -> stream error
/usr/share/ruby/net/http/response.rb:350:in `initialize'
/usr/share/ruby/net/http/response.rb:350:in `new'
/usr/share/ruby/net/http/response.rb:350:in `initialize'
/usr/share/ruby/net/http/response.rb:257:in `new'
/usr/share/ruby/net/http/response.rb:257:in `inflater'
/usr/share/ruby/net/http/response.rb:274:in `read_body_0'
/usr/share/ruby/net/http/response.rb:201:in `read_body'
/usr/share/ruby/net/http.rb:1127:in `block in get'
/usr/share/ruby/net/http.rb:1413:in `block (2 levels) in transport_request'
/usr/share/ruby/net/http/response.rb:162:in `reading_body'
/usr/share/ruby/net/http.rb:1412:in `block in transport_request'
/usr/share/ruby/net/http.rb:1403:in `catch'
/usr/share/ruby/net/http.rb:1403:in `transport_request'
/usr/share/ruby/net/http.rb:1376:in `request'
/usr/share/ruby/net/http.rb:1369:in `block in request'
/usr/share/ruby/net/http.rb:852:in `start'
/usr/share/ruby/net/http.rb:1367:in `request'
/usr/share/ruby/net/http.rb:1126:in `get'
/usr/local/share/gems/gems/faraday-0.9.2/lib/faraday/adapter/net_http.rb:80:in `perform_request'
/usr/local/share/gems/gems/faraday-0.9.2/lib/faraday/adapter/net_http.rb:40:in `block in call'
/usr/local/share/gems/gems/faraday-0.9.2/lib/faraday/adapter/net_http.rb:87:in `with_net_http_connection'
/usr/local/share/gems/gems/faraday-0.9.2/lib/faraday/adapter/net_http.rb:32:in `call'
/usr/local/share/gems/gems/puppet_forge-2.1.3/lib/puppet_forge/connection/connection_failure.rb:9:in `call'
/usr/local/share/gems/gems/faraday-0.9.2/lib/faraday/response.rb:8:in `call'
/usr/local/share/gems/gems/faraday_middleware-0.9.2/lib/faraday_middleware/response_middleware.rb:30:in `call'
/usr/local/share/gems/gems/puppet_forge-2.1.3/lib/puppet_forge/middleware/symbolify_json.rb:64:in `call'
/usr/local/share/gems/gems/faraday-0.9.2/lib/faraday/rack_builder.rb:139:in `build_response'
/usr/local/share/gems/gems/faraday-0.9.2/lib/faraday/connection.rb:377:in `run_request'
/usr/local/share/gems/gems/faraday-0.9.2/lib/faraday/connection.rb:140:in `get'
/usr/local/share/gems/gems/puppet_forge-2.1.3/lib/puppet_forge/v3/base.rb:69:in `request'
/usr/local/share/gems/gems/puppet_forge-2.1.3/lib/puppet_forge/lazy_accessors.rb:85:in `fetch'
/usr/local/share/gems/gems/puppet_forge-2.1.3/lib/puppet_forge/lazy_relations.rb:61:in `block in lazy'
/usr/local/share/gems/gems/r10k-2.1.1/lib/r10k/module/forge.rb:63:in `expected_version'
/usr/local/share/gems/gems/r10k-2.1.1/lib/r10k/module/forge.rb:119:in `status'
/usr/local/share/gems/gems/r10k-2.1.1/lib/r10k/module/forge.rb:41:in `sync'
/usr/local/share/gems/gems/r10k-2.1.1/lib/r10k/action/deploy/environment.rb:100:in `visit_module'
/usr/local/share/gems/gems/r10k-2.1.1/lib/r10k/action/visitor.rb:24:in `visit'
/usr/local/share/gems/gems/r10k-2.1.1/lib/r10k/module/base.rb:81:in `accept'
/usr/local/share/gems/gems/r10k-2.1.1/lib/r10k/puppetfile.rb:94:in `block (2 levels) in accept'
/usr/local/share/gems/gems/r10k-2.1.1/lib/r10k/puppetfile.rb:93:in `each'
/usr/local/share/gems/gems/r10k-2.1.1/lib/r10k/puppetfile.rb:93:in `block in accept'
/usr/local/share/gems/gems/r10k-2.1.1/lib/r10k/action/deploy/environment.rb:94:in `visit_puppetfile'
/usr/local/share/gems/gems/r10k-2.1.1/lib/r10k/action/visitor.rb:24:in `visit'
/usr/local/share/gems/gems/r10k-2.1.1/lib/r10k/puppetfile.rb:92:in `accept'
/usr/local/share/gems/gems/r10k-2.1.1/lib/r10k/environment/base.rb:98:in `block in accept'
/usr/local/share/gems/gems/r10k-2.1.1/lib/r10k/action/deploy/environment.rb:86:in `visit_environment'
/usr/local/share/gems/gems/r10k-2.1.1/lib/r10k/action/visitor.rb:24:in `visit'
/usr/local/share/gems/gems/r10k-2.1.1/lib/r10k/environment/base.rb:97:in `accept'
/usr/local/share/gems/gems/r10k-2.1.1/lib/r10k/source/base.rb:64:in `block (2 levels) in accept'
/usr/local/share/gems/gems/r10k-2.1.1/lib/r10k/source/base.rb:63:in `each'
/usr/local/share/gems/gems/r10k-2.1.1/lib/r10k/source/base.rb:63:in `block in accept'
/usr/local/share/gems/gems/r10k-2.1.1/lib/r10k/action/deploy/environment.rb:64:in `visit_source'
/usr/local/share/gems/gems/r10k-2.1.1/lib/r10k/action/visitor.rb:24:in `visit'
/usr/local/share/gems/gems/r10k-2.1.1/lib/r10k/source/base.rb:62:in `accept'
/usr/local/share/gems/gems/r10k-2.1.1/lib/r10k/deployment.rb:104:in `block (2 levels) in accept'
/usr/local/share/gems/gems/r10k-2.1.1/lib/r10k/deployment.rb:103:in `each'
/usr/local/share/gems/gems/r10k-2.1.1/lib/r10k/deployment.rb:103:in `block in accept'
/usr/local/share/gems/gems/r10k-2.1.1/lib/r10k/action/deploy/environment.rb:51:in `visit_deployment'
/usr/local/share/gems/gems/r10k-2.1.1/lib/r10k/action/visitor.rb:24:in `visit'
/usr/local/share/gems/gems/r10k-2.1.1/lib/r10k/deployment.rb:102:in `accept'
/usr/local/share/gems/gems/r10k-2.1.1/lib/r10k/action/deploy/environment.rb:29:in `call'
/usr/local/share/gems/gems/r10k-2.1.1/lib/r10k/action/runner.rb:33:in `call'
/usr/local/share/gems/gems/r10k-2.1.1/lib/r10k/action/cri_runner.rb:67:in `call'
/usr/local/share/gems/gems/cri-2.6.1/lib/cri/command_dsl.rb:223:in `block in runner'
/usr/local/share/gems/gems/cri-2.6.1/lib/cri/command.rb:298:in `call'
/usr/local/share/gems/gems/cri-2.6.1/lib/cri/command.rb:298:in `run_this'
/usr/local/share/gems/gems/cri-2.6.1/lib/cri/command.rb:251:in `run'
/usr/local/share/gems/gems/cri-2.6.1/lib/cri/command.rb:264:in `run'
/usr/local/share/gems/gems/cri-2.6.1/lib/cri/command.rb:264:in `run'
/usr/local/share/gems/gems/r10k-2.1.1/bin/r10k:7:in `<top (required)>'
/usr/local/bin/r10k:23:in `load'
/usr/local/bin/r10k:23:in `<main>'

我的 r10k 配置如下:

---
:cachedir: /var/cache/r10k
:sources:
  :control-repo:
    remote: git@github.com:something/puppet-control.git
    basedir: /etc/puppet/environments

git:
  provider: 'shellgit'
  private_key: '~/.ssh/puppet'
  username: 'git'

我在干净的 debian jessie 安装中遇到了同样的问题。

我做了一些数据包嗅探,我的 r10k 运行似乎正在调用 forge-api-fr.puppetlabs.com

如果我用 curl 调用这个 URL 它会失败,因为证书名称不匹配:

amo@debian-test-vm:~$ curl https://forge-api-fr.puppetlabs.com
curl: (51) SSL: no alternative certificate subject name matches target host name 'forge-api-fr.puppetlabs.com'

我怀疑这可能是我失败的原因,想知道您是否看到了相同的症状?