0

我正在使用 rbvmomi(ruby vsphere sdk)启动 vsphere 连接。有人知道忽略未签名 SSL 证书错误的标志吗?

1.9.2-p320 :003 > vim = RbVmomi::VIM.connect host: '10.13.37.1', user: 'boot', password: 'passwordhere:)'
OpenSSL::SSL::SSLError: SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed
    from /Users/f/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/1.9.1/net/http.rb:678:in `connect'
    from /Users/f/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/1.9.1/net/http.rb:678:in `block in connect'
    from /Users/f/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/1.9.1/timeout.rb:58:in `timeout'
    from /Users/f/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/1.9.1/timeout.rb:89:in `timeout'
    from /Users/f/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/1.9.1/net/http.rb:678:in `connect'
    from /Users/f/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/1.9.1/net/http.rb:637:in `do_start'
    from /Users/f/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/1.9.1/net/http.rb:632:in `start'
    from /Users/f/.rvm/gems/ruby-1.9.2-p320/gems/rbvmomi-1.8.1/lib/rbvmomi/trivial_soap.rb:56:in `restart_http'
    from /Users/f/.rvm/gems/ruby-1.9.2-p320/gems/rbvmomi-1.8.1/lib/rbvmomi/trivial_soap.rb:20:in `initialize'
    from /Users/f/.rvm/gems/ruby-1.9.2-p320/gems/rbvmomi-1.8.1/lib/rbvmomi/connection.rb:31:in `initialize'
    from /Users/f/.rvm/gems/ruby-1.9.2-p320/gems/rbvmomi-1.8.1/lib/rbvmomi/vim.rb:36:in `new'
    from /Users/f/.rvm/gems/ruby-1.9.2-p320/gems/rbvmomi-1.8.1/lib/rbvmomi/vim.rb:36:in `connect'
    from (irb):3
    from /Users/f/.rvm/rubies/ruby-1.9.2-p320/bin/irb:16:in `<main>'
4

2 回答 2

1

我在文档中找到了答案。

http://rdoc.info/github/rlane/rbvmomi/master/RbVmomi/VIM

:insecure 'true' 
于 2014-02-05T20:42:54.620 回答
0

当前的文档说我们必须通过一个选项来忽略这个错误。

insecure: true
于 2016-02-02T15:36:42.077 回答