首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >chef厨房不能在Windows 10集成bash中工作

chef厨房不能在Windows 10集成bash中工作
EN

Stack Overflow用户
提问于 2017-11-16 07:19:30
回答 2查看 1.3K关注 0票数 1

当我试图在“厨房”中运行任何命令时,我收到以下错误:

代码语言:javascript
复制
bash: /mnt/c/opscode/chefdk/bin/kitchen: C:/opscode/chefdk/embedded/bin/ruby.exe: bad interpreter: No such file or directory

当使用chefdk客户端时,它从外部集成bash工作,但我正在尝试从集成bash工作。

到目前为止,Chef实用程序命令,如'chef-client‘和’k刀‘似乎都是有效的。

EN

回答 2

Stack Overflow用户

发布于 2018-07-22 05:17:13

A possible solution for the SSH key permissions issue below

我们真的需要让它一直工作下去,因为它比Windows上的原生ChefDK快得多!下面的内容会让你更近一步:

  1. 停止Windows与WSL

共享路径

代码语言:javascript
复制
- Use `Regedit.exe` to create a DWORD `DistributionFlags` with value `fffffffd` under `HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LxssManager`. Then go to Services and restart the `LxssManager` service.

  1. 下载并安装适用于Ubuntu的ChefDK和Vagrant在WSL
  2. 中添加一些windows路径到WSL路径

export PATH="$PATH:/mnt/d/bin/Oracle/VirtualBox:/mnt/c/Windows/System32:/mnt/c/Windows/System32/WindowsPowerShell/v1.0"

  • Allow Vagrant Windows访问

export VAGRANT_WSL_ENABLE_WINDOWS_ACCESS='1'

  • Run kitchen converge和it now works

  • Running kitchen login仍然存在问题。它抱怨不安全的流浪私钥:

/opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/test-kitchen-1.22.0/lib/kitchen/instance.rb:217: warning: Insecure world writable dir /home/dgames/.yadr/bin in PATH, mode 040777 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ WARNING: UNPROTECTED PRIVATE KEY FILE! @ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ Permissions 0777 for '/mnt/k/20180707-mbp/repos/github/cloud/ssl_certs/.kitchen/kitchen-vagrant/all-cacerts-centos-72/.vagrant/machines/default/virtualbox/private_key' are too open. It is required that your private key files are NOT accessible by others. This private key will be ignored. Load key "/mnt/k/20180707-mbp/repos/ge_github/cloud/ssl_certs/.kitchen/kitchen-vagrant/all-cacerts-centos-72/.vagrant/machines/default/virtualbox/private_key": bad permissions vagrant@127.0.0.1's password:

票数 2
EN

Stack Overflow用户

发布于 2017-11-16 07:57:39

我们还没有设置好与WSL一起工作,因为Windows ChefDK安装程序是所有东西的原生版本。如果您想将其作为shell使用,我推荐使用MSYS2中的bash。

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

https://stackoverflow.com/questions/47318984

复制
相关文章

相似问题

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