Getting rid of capistrano password confirmation for mkdir command in vagrant environment -
i'm using 2 identical vagrant boxes used testing capistrano deployment process. can deploy application dev box prod box. however, cannot rid of password confirmation.
as far can see output, confirmation occurs when deployment process trying run mkdir -p /capistrano/tmp show below.
$ bundle exec cap production deploy --trace ** invoke production (first_time) ** execute production ** invoke load:defaults (first_time) ** execute load:defaults ** invoke deploy (first_time) ** execute deploy ** invoke deploy:starting (first_time) ** execute deploy:starting ** invoke deploy:check (first_time) ** invoke git:check (first_time) ** invoke git:wrapper (first_time) ** execute git:wrapper 00:00 git:wrapper 01 mkdir -p /capistrano/tmp vagrant@192.168.99.50's password: the current permissions on prod server follows (i've granted 777 manually described scp: /tmp/git-ssh.sh: permission denied):
vagrant@prod:~$ ls -l / drwxrwxrwx 3 vagrant vagrant 4096 apr 7 16:30 capistrano vagrant@prod:~$ ls -l /capistrano/ drwxrwxrwx 2 vagrant vagrant 4096 apr 7 16:33 tmp then when type password, creates git-ssh-football-production-vagrant.sh under /capistrano/tmp/ path.
vagrant@prod:~$ ls -l /capistrano/tmp/ -rwx------ 1 vagrant vagrant 93 apr 7 16:33 git-ssh-football-production-vagrant.sh i've removed/created/used different folders 777 permissions vagrant user , tried www-data couldn't rid of password confirmation.
deploy.rb
... set :tmp_dir, "/capistrano/tmp" set :user, "vagrant" ... production.rb
role :app, %w{vagrant@192.168.99.50} server '192.168.99.50', user: 'vagrant', roles: %w{app}
found solution. had add dev server's public key prod server's authorized_keys command below.
$ cat ~/.ssh/id_rsa.pub | ssh vagrant@192.168.99.40 'cat >> /home/vagrant/.ssh/authorized_keys'
Comments
Post a Comment