0

I have a question about using the Rubber gem to deploy a Rails app to EC2. When I go about running

cap rubber:create_staging

This line of code runs in a loop.

executing `rubber:_allow_root_ssh' executing "sudo -p 'sudo password: ' bash -l -c 'cp /home/ubuntu/.ssh/authorized_keys /root/.ssh/'" servers: ["witheld"] . Failed to connect to witheld, retrying

I believe this may be an issue with my keypairs. In terms of my keynames, I have a current private key called keyname (plain text file) and a public key called keyname.pub in my config/rubber folder. My rubber.yml file lists

key_name: keyname

key_file: "#{Dir[(File.expand_path('~') rescue '/root') + '/.ec2/*' + cloud_providers.aws.key_name].first}"

I'm pretty sure all other information is correct, but I obviously can't copy and paste it in. Any suggestions?

1 Answer 1

1

your keys should be in ~/.ec2/ folder not in config/rubber folder. also make sure you remove .pem extension from your private key file and .pub stays with your public file. Also change key_name: [your private key file name here] in your rubber.yml file.

based on your key_file: settings, rubber will look for these keys in ~/.ec2 folder. So move them to there.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.