首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >刀子没有使用Knife.rb

刀子没有使用Knife.rb
EN

Stack Overflow用户
提问于 2018-05-25 03:09:25
回答 1查看 101关注 0票数 1

Chef: 14.1.12Windows10学习教程我在~/ knife.rb -chef/.chef/knife.rb (C:\users\wdavis\learn-chef.chef\knife.rb)学习

我运行ssl fetch knife ssl fetch

代码语言:javascript
复制
Results:
    INFO: Using configuration from C:/Users/wdavis/learn-chef/.chef/knife.rb
    WARNING: Certificates from localhost will be fetched and placed in your trusted_cert
    directory (c:\users\wdavis\learn-chef\.chef\trusted_certs).

    Knife has no means to verify these are the correct certificates. You should
    verify the authenticity of these certificates after downloading.

    ERROR: Errno::ECONNRESET: An existing connection was forcibly closed by the remote host. - SSL_connect

这是我的knife.rb:

代码语言:javascript
复制
current_dir = File.dirname(__FILE__)
log_level                 :info
log_location              STDOUT
node_name                 "chefadmin"
client_key                "#{current_dir}/chefadmin.pem"
chef_server_url           "https://synchef.url.com/organizations/syn"
cookbook_path             ["#{current_dir}/../cookbooks/"]

但是,如果我运行:knife ssl fetch https://synchef.url.com

它工作得很好-那么为什么只使用knife.rb时它就不能工作呢?

我还应该补充说,我在尝试上传食谱时也看到了类似的问题。它说它正在使用我的knife.rb,食谱显然在那里,但它声称找不到它们。

所以在我看来,也许它并没有真正使用它应该使用的knife.rb?

这是另一个例子:

代码语言:javascript
复制
knife ssl check -V
INFO: Using configuration from C:/Users/wdavis/learn-chef/.chef/knife.rb
Connecting to host localhost:443
ERROR: Errno::ECONNRESET: An existing connection was forcibly closed by the remote host. - SSL_connect

为什么要尝试连接到localhost:443?这不是在我的knife.rb中配置的

EN

回答 1

Stack Overflow用户

发布于 2018-05-25 03:30:17

我在VS Code中编写了原始文件-它将文件另存为UTF-16 LE。我注意到我下载的初学者工具包中的文件是UTF-8。我以UTF-8格式重新保存了文件,命令运行正常。似乎ChefDk附带的ruby版本不喜欢UTF-16LE?

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/50516558

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档