简体   繁体   English

Test Kitchen登录命令失败

[英]Test Kitchen login command failing

I'm following this getting-started guide for test kitchen and made some initial good progress. 我正在按照这个入门的测试厨房指南,并取得了一些初步的良好进展。 However when trying to use kitchen login command mentioned on this page , it fails with 'No such file or directory - ssh' My local system is Windows7, can anyone help please? 但是当尝试使用页面上提到的厨房登录命令时,它会失败并显示“没有这样的文件或目录 - ssh”我的本地系统是Windows7,任何人都可以帮忙吗?

C:/Program Files (x86)/Heroku/ruby-1.9.3/lib/ruby/gems/1.9.1/gems/test-kitchen-1.4.0/lib/kitchen/instance.rb:220:in exec': No such file or directory - ssh (Errno::ENOENT ) from C:/Program Files (x86)/Heroku/ruby-1.9.3/lib/ruby/gems/1.9.1/gems/test-kitchen-1.4.0/lib/kitchen/instance.rb:220:in login' from C:/Program Files (x86)/Heroku/ruby-1.9.3/lib/ruby/gems/1.9.1/gems/test-kitchen-1.4.0/lib/kitchen/command/login.rb:39:in call' from C:/Program Files (x86)/Heroku/ruby-1.9.3/lib/ruby/gems/1.9.1/gems/test-kitchen-1.4.0/lib/kitchen/cli.rb:56:in perform' from C:/Program Files (x86)/Heroku/ruby-1.9.3/lib/ruby/gems/1.9.1/gems/test-kitchen-1.4.0/lib/kitchen/cli.rb:224:in login' from C:/Program Files (x86)/Heroku/ruby-1.9.3/lib/ruby/gems/1.9.1/gems/thor-0.19.1/lib/thor/command.rb:27:in run' from C:/Program Files (x86)/Heroku/ruby-1.9.3/lib/ruby/gems/1.9.1/gems/thor-0.19.1/lib/thor/invocation.rb:126:in invoke_command' from C:/Program Files (x86)/Heroku/ruby-1.9.3/lib/ruby/gems/1.9.1/gems/test-kitchen-1.4.0/lib/kitchen/cli.rb:308:in C:/ Program Files(x86)/Heroku/ruby-1.9.3/lib/ruby/gems/1.9.1/gems/test-kitchen-1.4.0/lib/kitchen/instance.rb:220:in exec': No such file or directory - ssh (Errno::ENOENT ) from C:/Program Files (x86)/Heroku/ruby-1.9.3/lib/ruby/gems/1.9.1/gems/test-kitchen-1.4.0/lib/kitchen/instance.rb:220:in登录'来自C:/ Program Files(x86)/Heroku/ruby-1.9.3/lib/ruby/gems/1.9.1/gems/test-kitchen-1.4 .0 / lib / kitchen / command / login.rb:39: call' from C:/Program Files (x86)/Heroku/ruby-1.9.3/lib/ruby/gems/1.9.1/gems/test-kitchen-1.4.0/lib/kitchen/cli.rb:56:in C'/ Program Files(x86)/Heroku/ruby-1.9.3/lib/ruby/gems/1.9.1/gems/test -kitchen-1.4.0 / lib / kitchen / cli.rb:224: login' from C:/Program Files (x86)/Heroku/ruby-1.9.3/lib/ruby/gems/1.9.1/gems/thor-0.19.1/lib/thor/command.rb:27:in运行'来自C:/ Program Files(x86)/Heroku/ruby-1.9.3/lib/ruby/gems/1.9.1/gems/thor -0.19.1 / lib / thor / invocation.rb:126: invoke_command' from C:/Program Files (x86)/Heroku/ruby-1.9.3/lib/ruby/gems/1.9.1/gems/test-kitchen-1.4.0/lib/kitchen/cli.rb:308:in invoke_command' from C:/Program Files (x86)/Heroku/ruby-1.9.3/lib/ruby/gems/1.9.1/gems/test-kitchen-1.4.0/lib/kitchen/cli.rb:308:in invoke_task' from C:/Program Files (x86)/Heroku/ruby-1.9.3/lib/ruby/gems/1.9.1/gems/thor-0.19.1/lib/thor.rb:359:in dispatch' from C:/Program Files (x86)/Heroku/ruby-1.9.3/lib/ruby/gems/1.9.1/gems/thor-0.19.1/lib/thor/base.rb:440:in start' from C:/Program Files (x86)/Heroku/ruby-1.9.3/lib/ruby/gems/1.9.1/gems/test-kitchen-1.4.0/bin/kitchen:13:in block in <top (required)>' from C:/Program Files (x86)/Heroku/ruby-1.9.3/lib/ruby/gems/1.9.1/gems/test-kitchen-1.4.0/lib/kitchen/errors.rb:154:in with_friendly_errors' from C:/Program Files (x86)/Heroku/ruby-1.9.3/lib/ruby/gems/1.9.1/gems/test-kitchen-1.4.0/bin/kitchen:13:in <top (required)>' from C:/Program Files (x86)/Heroku/ruby-1.9.3/bin/kitchen:23:in load' from C:/Program Files (x86)/Heroku/ruby-1.9.3/bin/kitchen:23:in `' invoke_command' from C:/Program Files (x86)/Heroku/ruby-1.9.3/lib/ruby/gems/1.9.1/gems/test-kitchen-1.4.0/lib/kitchen/cli.rb:308:in来自C:/ Program Files(x86)/Heroku/ruby-1.9.3/lib/ruby/gems/1.9.1/gems/thor的invoke_task -0.19.1 / lib / thor.rb:359: dispatch' from C:/Program Files (x86)/Heroku/ruby-1.9.3/lib/ruby/gems/1.9.1/gems/thor-0.19.1/lib/thor/base.rb:440:in从C开始':/ Program Files(x86)/Heroku/ruby-1.9.3/lib/ruby/gems/1.9.1/gems/test-kitchen-1.4 .0 / bin / kitchen:13:在block in <top (required)>' from C:/Program Files (x86)/Heroku/ruby-1.9.3/lib/ruby/gems/1.9.1/gems/test-kitchen-1.4.0/lib/kitchen/errors.rb:154:in with_friendly_errors'来自C:/ Program Files(x86)/Heroku/ruby-1.9.3/lib/ruby/gems/1.9.1/gems/ test-kitchen-1.4.0 / bin / kitchen:13:在<top (required)>' from C:/Program Files (x86)/Heroku/ruby-1.9.3/bin/kitchen:23:in load'来自C:/ Program Files(x86)/Heroku/ruby-1.9.3/bin/kitchen:23:in`

You need to install Cygwin and SSH. 您需要安装Cygwin和SSH。 http://www.howtogeek.com/howto/41560/how-to-get-ssh-command-line-access-to-windows-7-using-cygwin/ . http://www.howtogeek.com/howto/41560/how-to-get-ssh-command-line-access-to-windows-7-using-cygwin/ Once you are able to run the 'ssh' command from a windows command prompt you should be able to run the kitchen login command successfully past the current error you are receiving. 一旦你能够从Windows命令提示符运行'ssh'命令,你应该能够成功地运行kitchen login命令,超过你收到的当前错误。 The 'kitchen login' command is trying to use ssh to get to the vm but it can't because its not installed/configured on your computer. 'kitchen login'命令试图使用ssh到达vm,但它不能,因为它没有在你的计算机上安装/配置。

Or you can log in via vagrant. 或者您可以通过流浪汉登录。 Use vagrant local-status to get a list of local VMs and their ids. 使用vagrant local-status获取本地VM及其ID的列表。 Then run vagrant ssh <id> . 然后运行vagrant ssh <id>

In Windows, ChefDK comes embedded with Git for Windows, which includes its own version of ssh. 在Windows中,ChefDK嵌入了Git for Windows,其中包含自己的ssh版本。

If you have this issue in Windows, and you have ChefDK installed, then make sure you have the following in your System PATH environment variable (The actual location may vary if you installed ChefDK in a different location): 如果您在Windows中遇到此问题,并且安装了ChefDK,请确保您的System PATH环境变量中包含以下内容(如果您在其他位置安装了ChefDK,实际位置可能会有所不同):

C:\opscode\chefdk\embedded\git\usr\bin

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM