$ knife cookbook upload -s
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/mixlib-cli-1.3.0/lib/mixlib/cli.rb:226:in `parse_options': missing argument: -s (OptionParser::MissingArgument)
from /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.2/lib/chef/knife.rb:299:in `parse_options'
from /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.2/lib/chef/knife.rb:279:in `initialize'
from /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.2/lib/chef/knife.rb:171:in `new'
from /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.2/lib/chef/knife.rb:171:in `run'
from /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.2/lib/chef/application/knife.rb:123:in `run'
from /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.2/bin/knife:25:in `<top (required)>'
from /usr/bin/knife:23:in `load'
from /usr/bin/knife:23:in `<main>'
这是knife.rb
:
log_level :info
log_location STDOUT
node_name 'sala'
client_key '/home/ubuntu/chef-repo/.chef/sala.pem'
validation_client_name 'chef-validator'
validation_key '/home/ubuntu/chef-repo/chef-validator.pem'
chef_server_url 'mychefserver.example.com:443';
syntax_check_cache_path '/home/ubuntu/chef-repo/.chef/syntax_check_cache'
cookbook_path '/home/ubuntu/chef-repo/cookbooks'
答案 0 :(得分:0)
来自刀帮助页面:
-s, --server-url URL Chef Server URL
您收到的错误是:
parse_options': missing argument: -s
因此很明显,您没有将厨师服务器网址传递给-s
你试过knife cookbook upload cookbook_name
吗?