Versions:
- Ruby - ruby 2.0.0p247
- Capistrano (2.15.5)
- Rake / Rails / etc (4.0.2)
Platform:
- Working on.... Mac OSX Mavericks. Local dev on Mac Mini, SSHing into it from Macbook or iMac with -A so all keys are passed through, also testing direct on Mac Mini too.
- Deploying to... EC2 instance, animoto runing Centos 6.5, nginx, php-fpm. Its running the same versions.
Logs:
So, I do hope someone can help me here, I've been trying and goggling for HOURS, going through various buts of tutorial trying to figure out how to set this all up. Wp-Stack's read me is very think on ground and after having no luck I decided to foliow the Capistrano documentation instead. I went through everything in the authentication section step by step and got it all working, my remote mac could load the servers stats without typing a password and the ssh git pull via bit bucket works just fine.
However i'm getting the permission denied listed here
Now, the user deploy has been created successfully on my EC2 instance and I can manually use "mkdir" from the command line and create these directories with no issues. I figured that maybe there is something wrong here because ec2 uses .tem identify files to SSH in securely. However I've googled this and I've tried all and every method I can to get them to include in the .rb files and they don't seem to do anything. Originally as soon as the IP Address was brought up there would be a permission denied error, but now I've added my Mac minis SSH key to the remote server that doesn't happen, instead it just gives the permission denied on write. I'm guessing I need to do something completely different for EC2 and its just not well documented on the net, yet I've found others who had problems, listed their solution and it does nothing for me, so maybe WP-stacks default files need more editing?
Ive tried adding these to the production.rb to start with
ssh_options[:auth_methods] = 'publickey'
set :ssh_options, {:keys => ['~/.aws/master.pem', '/etc/.aws/master.pem']}
I didn't know if it would need the .pem that is on my local system which is used when I SSH in, or if it wants one on the remote system, so I have on on each, with the correct chmod 400 permissions accessible to the users executing the script but nothing. Do I need to remove something else for this happen perhaps?
If I want to SSH into my EC2 instance from my Macbook I have to use this from the command line
ssh -i ~/.aws/master.pem root@54.242.153.162
(IP Changed for security reasons)
Now, there is no way for me to SSH in and have control, obviously I've created the deploy user now and I can use the same method and SSH in successfully with substituting root for deploy - if needed deploy can also run sudo.
I hope someone can help, I've spent about 6 hours trying everything I can find online and I'm obviously totally lost here. Look forward to your input, thanks in advance.