'berks upload --no-ssl-verify' fails

I ran ‘berks install’ successfully. I can run ‘knife cookbook upload mycookbook’ successfully.

But berks upload fails as shown below. I did this in a corporate environment with proxy. On my home computer without proxy, ‘berks upload’ runs without issues.


$ berks upload --no-ssl-verify
/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/httpclient-2.6.0.1/lib/httpclient/webagent-cookie.rb:458: warning: already initialized constant HTTPClient::CookieManager
/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/httpclient-2.6.0.1/lib/httpclient/cookie.rb:8: warning: previous definition of CookieManager was here
Skipping hostsfile (2.4.5) (frozen)
/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/celluloid-0.16.0/lib/celluloid/actor.rb:345:in each': task was terminated (Celluloid::Task::TerminatedError) from /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/celluloid-0.16.0/lib/celluloid/actor.rb:345:incleanup’
from /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/celluloid-0.16.0/lib/celluloid/actor.rb:329:in shutdown' from /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/celluloid-0.16.0/lib/celluloid/actor.rb:321:inhandle_crash’
from /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/celluloid-0.16.0/lib/celluloid/actor.rb:166:in rescue in run' from /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/celluloid-0.16.0/lib/celluloid/actor.rb:148:inrun’
from /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/celluloid-0.16.0/lib/celluloid/actor.rb:130:in block in start' from /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/celluloid-0.16.0/lib/celluloid/thread_handle.rb:13:inblock in initialize’
from /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/celluloid-0.16.0/lib/celluloid/actor_system.rb:32:in block in get_thread' from /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/celluloid-0.16.0/lib/celluloid/internal_pool.rb:130:incall’
from /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/celluloid-0.16.0/lib/celluloid/internal_pool.rb:130:in block in create' from (celluloid):0:inremote procedure call’
from /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/celluloid-0.16.0/lib/celluloid/calls.rb:92:in value' from /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/celluloid-0.16.0/lib/celluloid/proxies/sync_proxy.rb:33:inmethod_missing’
from /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/berkshelf-4.1.1/lib/berkshelf/uploader.rb:55:in block (2 levels) in upload' from /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/berkshelf-4.1.1/lib/berkshelf/uploader.rb:51:ineach’
from /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/berkshelf-4.1.1/lib/berkshelf/uploader.rb:51:in block in upload' from /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/ridley-4.4.2/lib/ridley/client.rb:38:inopen’
from /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/ridley-4.4.2/lib/ridley.rb:53:in open' from /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/berkshelf-4.1.1/lib/berkshelf.rb:144:inridley_connection’
from /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/berkshelf-4.1.1/lib/berkshelf/uploader.rb:50:in upload' from /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/berkshelf-4.1.1/lib/berkshelf/uploader.rb:37:inrun’
from /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/berkshelf-4.1.1/lib/berkshelf/berksfile.rb:592:in upload' from /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/berkshelf-4.1.1/lib/berkshelf/cli.rb:208:inupload’
from /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/thor-0.19.1/lib/thor/command.rb:27:in run' from /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/thor-0.19.1/lib/thor/invocation.rb:126:ininvoke_command’
from /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/thor-0.19.1/lib/thor.rb:359:in dispatch' from /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/berkshelf-4.1.1/lib/berkshelf/cli.rb:52:indispatch’
from /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/thor-0.19.1/lib/thor/base.rb:440:in start' from /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/berkshelf-4.1.1/lib/berkshelf/cli.rb:27:inexecute!‘
from /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/berkshelf-4.1.1/bin/berks:5:in <top (required)>' from /opt/chefdk/bin/berks:48:inload’
from /opt/chefdk/bin/berks:48:in `’

Victor,

A couple possibilities here. But I think the simplest is that berkshelf
doesn’t honor the --no-ssl-verify (or at least it didn’t).

I’ve always setup my berkshelf config.json to turn off ssl verify if I need
to: https://gist.github.com/galenemery/144e66097b863cac7ba4

Galen,

I added {“ssl”: {“verify”: false}} into ~/.berkshelf/config.json. But ‘berks upload’ gives the same error.

Maybe this error is something else?

  1. Try to unset proxy variables while uploading

Example: unset http_proxy

  1. Setup no_proxy value in knife.rb to your chef url.

Examle : no_proxy “chef_server.corp.com”

reddybathina, that fixed it. Thanks.