Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kitchen login prompts for password #81

Closed
miketheman opened this issue Sep 6, 2014 · 11 comments
Closed

kitchen login prompts for password #81

miketheman opened this issue Sep 6, 2014 · 11 comments

Comments

@miketheman
Copy link
Contributor

I've tried to figure out what's not moving along correctly, and finally threw my hands up in the air at my own inability to grok this, so here I am asking about it.

Most kitchen drivers provide the user/name and password, so that you don't have to type a password. kitchen-vagrant handles this correctly.

With kitchen-docker, I must type in the default password any time I want to log in.

I can see that there's a setting for username/password in the code and this user/password combo does indeed work, since the kitchen setup/converge/verify/test all work over ssh, right?

$ kitchen login -l debug source-ubuntu-1204
D      [kitchen::driver::docker command] BEGIN (docker > /dev/null)
D      [kitchen::driver::docker command] END (0m0.00s)
D      Berksfile found at /Users/miketheman/code/miketheman/nginx/Berksfile, loading Berkshelf
D      Berkshelf 3.1.5 library loaded
D      Login command: ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o LogLevel=VERBOSE -p 49156 [email protected] (Options: {})
Warning: Permanently added '[192.168.42.43]:49156' (RSA) to the list of known hosts.
[email protected]'s password:
Authenticated to 192.168.42.43 ([192.168.42.43]:49156).
Last login: Sat Sep  6 14:59:15 2014 from 192.168.42.1
kitchen@3b5d8f92de41:~$

Related gems:

  • kitchen-docker (1.5.0)
  • test-kitchen (1.2.1)

My .kitchen.local.yml:

driver:
  name: docker
  socket: tcp://192.168.42.43:2375 # boot2docker

And now I don't know where else to look.

@cmluciano
Copy link

I am also experiencing this problem with kitchen verify and kitchen test

@ghost
Copy link

ghost commented Sep 16, 2014

This seems to be a problem with the implementation of test-kitchen. A kitchen converge server is done via ruby and net::SSH - There is a possibility to use a password to connect to the server. This describes the behavior @miketheman and also I am getting. If you are doing a kitchen login server test-kitchen uses the ssh binary. This is not able to handle a password through command line.

I would prepare a pull request to set a pair of public/private key to use with this gem. I would prefer this strategy to set the (password/private-key).

  • Use attribute if declared.
  • If attribute not declared - use vagrant-key if available. (as this key is installed in almost every test-kitchen setup from my point of view)
  • password fall-back.

@portertech what is your opinion about this?

@drag00n would you please send us further details about your setup as this seems to be another problem. It would be helpful to get kitchen converge -l debug hostand kitchen login -l debug host output. Thanks!

@bplunkert
Copy link

👍

1 similar comment
@benlemasurier
Copy link

👍

@miketheman
Copy link
Contributor Author

@portertech Have you had a chance to read this? With the recent changes to the lib, I haven't had a chance to see if I can dig through to trace the behavior, but I can confirm that a kitchen login still prompts the user for a password.

@jerroydmoore
Copy link

+1 for experiencing this problem.

@shaneramey
Copy link

I'm also having this issue. Here's a workaround command-line Expect script:

expect -c 'spawn kitchen login; expect "ssword: "; send -- "kitchen\r"; interact'

@jeffbyrnes
Copy link

This was fixed in #141, and released in v2.3.0.

@petere
Copy link

petere commented Aug 31, 2015

I can confirm that I had this issue with 1.5.0 but no longer with 2.3.0.

@coderanger
Copy link
Contributor

Yep, closing this out now that this is no longer an issue.

@amaltson
Copy link

amaltson commented Sep 1, 2015

Thanks for getting this in, super useful! 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants