Capistrano keeps asking me for password for every deplyoyment. How do I not let it happen?
ruby version 1.8.7 REE
capistrano version 2.5.19
Here is my capfile and directory permissions.
Everything up-to-date
** transaction: start
* executing `deploy:update_code'
updating the cached checkout on all servers
executing locally: "git ls-remote [email protected]:username/
app_name.git master"
* executing "if [ -d /var/www/app_name/shared/cached-copy ]; then
cd /var/www/app_name/shared/cached-copy && git fetch -q origin && git
reset -q --hard 5d47453e28385200daa971ca4982632caf7fb67e && git clean -
q -d -x -f; else git clone -q [email protected]:username/app_name.git /
var/www/app_name/shared/cached-copy && cd /var/www/app_name/shared/
cached-copy && git checkout -q -b deploy
5d47453e28385200daa971ca4982632caf7fb67e; fi"
servers: ["1xx.2xx.xxx.xxx"]
Password:
[173.230.158.13] executing command
command finished
Update
OK, i am in a super bad mess, now I get this error.
I added a "deploy" user like..
adduser --system --home /home/deploy --shell /bin/bash --ingroup nogroup deploy
chmod u+w /etc/sudoers
echo "deploy ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
chmod u-w /etc/sudoers
Then I added the configuration you mentioned in my .ssh/config file.
Host prod
Hostname xxx.xxx.xxx.xx
User deploy
ForwardAgent yes
Please help!