bevacqua / grunt-ec2

:package: Create, deploy to, and shutdown Amazon EC2 instances
https://ponyfoo.com
MIT License
188 stars 38 forks source link

ec2_launch hangs after key pair overwrite prompt #18

Open kmctown opened 10 years ago

kmctown commented 10 years ago

Your library looks great -- trying to get it working in my production environment. I want to have multiple instances with the same name, API, for instance, because it seems from reading the docs that's the preferred method to utilize deploy_many. I'm running into the following issue:

Generating public/private rsa key pair.
<KEY_PATH> already exists.
Overwrite (y/n)?

I would like to choose n so that it would use the existing key pair, assuming that was the intention. The script then hangs indefinitely.

I might be doing something wrong but bringing it up here.

ghost commented 10 years ago

I have the same issue.

jingconan commented 8 years ago

The culprit is here https://github.com/bevacqua/grunt-ec2/blob/master/tasks/ec2_create_keypair.js#L37

It calls ssh-keygen in child process. However, the stdin input (aka y/n you typed) is not passed in, so it hanges there.

A hacky workaround is to just comment this line when you need to use existing key value pair