0

I have the following Berksfile in my top level Chef repo directory.

source "https://www.mySVNrepo.com/repos/myproject/trunk"

cookbook 'helloworld',      '= 0.1.0'

and when I do a berks install, I get

[root@chef trunk]# berks install
Resolving cookbook dependencies...
Fetching cookbook index from https://www.mySVNrepo/repos/myproject/trunk...
/opt/chef-server/embedded/lib/ruby/1.9.1/net/http.rb:800:in `connect': SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (Faraday::SSLError)
        from /opt/chef-server/embedded/lib/ruby/1.9.1/net/http.rb:800:in `block in connect'
        from /opt/chef-server/embedded/lib/ruby/1.9.1/timeout.rb:69:in `timeout'
        from /opt/chef-server/embedded/lib/ruby/1.9.1/timeout.rb:100:in `timeout'
        from /opt/chef-server/embedded/lib/ruby/1.9.1/net/http.rb:800:in `connect'
        from /opt/chef-server/embedded/lib/ruby/1.9.1/net/http.rb:756:in `do_start'
        from /opt/chef-server/embedded/lib/ruby/1.9.1/net/http.rb:745:in `start'
        from /opt/chef-server/embedded/lib/ruby/1.9.1/net/http.rb:1285:in `request'
        from /opt/chef-server/embedded/lib/ruby/1.9.1/net/http.rb:1027:in `get'
        from /opt/chef-server/embedded/lib/ruby/gems/1.9.1/gems/faraday-0.9.0/lib/faraday/adapter/net_http.rb:78:in `perform_request'
        from /opt/chef-server/embedded/lib/ruby/gems/1.9.1/gems/faraday-0.9.0/lib/faraday/adapter/net_http.rb:39:in `call'
        from /opt/chef-server/embedded/lib/ruby/gems/1.9.1/gems/faraday-0.9.0/lib/faraday/request/retry.rb:87:in `call'
        from /opt/chef-server/embedded/lib/ruby/gems/1.9.1/gems/faraday-0.9.0/lib/faraday/response.rb:8:in `call'
        from /opt/chef-server/embedded/lib/ruby/gems/1.9.1/gems/faraday-0.9.0/lib/faraday/response.rb:8:in `call'
        from /opt/chef-server/embedded/lib/ruby/gems/1.9.1/gems/faraday-0.9.0/lib/faraday/rack_builder.rb:139:in `build_response'
        from /opt/chef-server/embedded/lib/ruby/gems/1.9.1/gems/faraday-0.9.0/lib/faraday/connection.rb:377:in `run_request'
        from /opt/chef-server/embedded/lib/ruby/gems/1.9.1/gems/faraday-0.9.0/lib/faraday/connection.rb:140:in `get'
        from /opt/chef-server/embedded/lib/ruby/gems/1.9.1/gems/berkshelf-api-client-1.2.0/lib/berkshelf/api_client/connection.rb:62:in `universe'
        from /opt/chef-server/embedded/lib/ruby/gems/1.9.1/gems/berkshelf-3.1.4/lib/berkshelf/source.rb:22:in `build_universe'
        from /opt/chef-server/embedded/lib/ruby/gems/1.9.1/gems/berkshelf-3.1.4/lib/berkshelf/installer.rb:21:in `block (2 levels) in build_universe'

How do I tell Berkshelf to use a certain user/pw to access my SVN repo? Is it even supported?

Chris F
  • 14,337
  • 30
  • 94
  • 192

1 Answers1

0

Your HTTPS certificate isn't verifiable. You can either tell Berkshelf to not verify certificates via --no-ssl-verify or fix your certificate. The latter is recommended.

coderanger
  • 52,400
  • 4
  • 52
  • 75
  • Yes, that's the point of the post. I'm running the command as root, but want to use a different user/pw/certificate with a known-good certificate? Make sense? – Chris F Sep 25 '14 at 20:28
  • The username/password are not related, this is just about the HTTPS connection establishing in the first place. You can configure `svn` via its own config files for its authentication. – coderanger Sep 25 '14 at 22:04
  • Oh, I also just noticed you put your SVN repo as the source server. That isn't a thing, that must point at a berkshelf-api server like `https://supermarket.getchef.com/` or your own berks api server deployment. – coderanger Sep 25 '14 at 22:05
  • Ah, my misunderstanding about the "source." I intended to use Berkshelf to download "my" cookbooks from my SVN repo and then upload them to my server, but that is NOT the purpose? – Chris F Sep 25 '14 at 22:50
  • 1
    To the best of my knowledge, Berkshelf doesn't support downloading from Subversion. It supports supermarket, chef-servers, and git, but that's it. – coderanger Sep 25 '14 at 23:05