Capistrano 3 sudo task

The Capistrano 3 guide recommends the use of passwordless sudo. This allows your less-priveleged user execute the sudo command without having to enter a password via the PTY. You can use the task that Kentaro wrote above, and add something like the following to your /etc/sudoers file: deploy ALL=NOPASSWD:/bin/cp ~/something /something http://www.capistranorb.com/documentation/getting-started/authentication-and-authorisation/#toc_8

SSH Agent Forwarding not working

Do you have your ssh key added to the list of agent identites ? You can check with ssh-add -L , you should see the key your are using to connect to github : $ ssh-add -L ssh-rsa AAAAB3N…..0VmSiRvTzBrbU0ww== /Users/youruser/.ssh/id_rsa If you don’t see the ssh key you use for github or a message like … Read more

How to run shell commands on server in Capistrano v3?

In Capistrano v3, you must specify where you want to run the code by calling on with a list of hostnames, e.g. task :execute_on_server do on “root@example.com” do execute “some_command” end end If you have roles set up, you can use the roles method as a convenience: role :mailserver, “root@mail.example.com” task :check_mail do on roles(:mailserver) … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)