-
Notifications
You must be signed in to change notification settings - Fork 59
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
genesis:provision should setup password-less SSH #131
Conversation
@jameswlane has a similar bash script going: |
That's pretty much exactly what I'm doing now, but I'm trying to integrate it into our |
If there is anything I can do to help out let me know. I am not familiar with expect, but that route sounds a lot better for the end user. |
I tested this against a local vagrant machine -- several times! -- and it seems to work:
|
Easy way to test:
/cc @weeirishman @EvanK |
Worked perfectly for me, thanks guys. |
This should give us some output of the PTY process, & make debugging easier if/when it busts
Added some verbose output to make debugging easier, but I believe this fix is ready to roll! |
net-ssh workaround for genesis:provision task
Whoops, this wasn't tagged for release. Do you want me to take care of it @EvanK ? |
Sure |
Done! Thanks for your help @EvanK! |
Because Capistrano ~2.15 (thanks to net-ssh 2.8.0) has issues with password authentication, I think the best course is for
genesis:provision -S user=... -S password=...
to use the credentials locally to setup the server for public-key authentication.Remove check foruser
(https://github.com/genesis/wordpress/blob/master/deployment/deploy.rb#L56-L64), as we should always use thedeploy
user.deploy
on remote server (see SSH/expect tip below).deploy
user's SSH keys to remote machine.deploy
(e.g.%deploy ALL=(ALL) NOPASSWD:ALL
).genesis:provision
withdeploy
user and private key,Here's a trick to using
expect
to SSH into a machine with a user/pass & execute a command: