Each time I use cap deploy I have to type in the password for the user I assigned to do cap deploy. This is getting kind of annoying, so I''m wondering how I can do this without having to type in the password each time.
You''ll have to setup your SSH keys to the server where the application is being deployed - http://pkeck.myweb.uga.edu/ssh/ - Maurício Linhares http://codeshooter.wordpress.com/ | http://twitter.com/mauriciojr On Tue, Jun 16, 2009 at 9:31 PM, Mike C<snibble-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > Each time I use cap deploy I have to type in the password for the user > I assigned to do cap deploy. This is getting kind of annoying, so I''m > wondering how I can do this without having to type in the password > each time. > > >
I did that but it''s still asking for passwords. On Jun 16, 6:34 pm, Maurício Linhares <mauricio.linha...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> You''ll have to setup your SSH keys to the server where the application > is being deployed -http://pkeck.myweb.uga.edu/ssh/ > > - > Maurício Linhareshttp://codeshooter.wordpress.com/|http://twitter.com/mauriciojr > > On Tue, Jun 16, 2009 at 9:31 PM, Mike C<snib...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > Each time I use cap deploy I have to type in the password for the user > > I assigned to do cap deploy. This is getting kind of annoying, so I''m > > wondering how I can do this without having to type in the password > > each time.
Then you did something wrong :) Review whatever you did and do it again. You should also do the same from the machine where the code is being deployed to the machine where your source code repo lives, specially if you''re using git and ssh. - Maurício Linhares http://codeshooter.wordpress.com/ | http://twitter.com/mauriciojr On Tue, Jun 16, 2009 at 11:10 PM, Mike C<snibble-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > I did that but it''s still asking for passwords. >
Er well it worked but it still asks for a password. You see, for doing git push it used to ask for a password but it doesn''t anymore, and using cap deploy:update_code used to ask for the password 3 times but now it only asks for it once. On Jun 16, 7:12 pm, Maurício Linhares <mauricio.linha...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Then you did something wrong :) > > Review whatever you did and do it again. > > You should also do the same from the machine where the code is being > deployed to the machine where your source code repo lives, specially > if you''re using git and ssh. > > - > Maurício Linhareshttp://codeshooter.wordpress.com/|http://twitter.com/mauriciojr > > On Tue, Jun 16, 2009 at 11:10 PM, Mike C<snib...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > I did that but it''s still asking for passwords.
Mike C wrote:> Er well it worked but it still asks for a password. You see, for doing > git push it used to ask for a password but it doesn''t anymore, and > using cap deploy:update_code used to ask for the password 3 times but > now it only asks for it once. >There are two separate things going on. cap remotely ssh''s on to the remote server - ssh keys can prevent requiring entering a password here - and then on the remote machine cap accesses your git repository. If you have told cap to access it as ssh:// etc.. then a password is required for this also - so you need ssh shared keys between the deployment server and the git repository.
But the deployment server and the git repository are the same server in my case. What should I do? On Jun 17, 1:47 am, Andrew Porter <a...-OV3k8GMR8cdg9hUCZPvPmw@public.gmane.org> wrote:> Mike C wrote: > > Er well it worked but it still asks for a password. You see, for doing > > git push it used to ask for a password but it doesn''t anymore, and > > using cap deploy:update_code used to ask for the password 3 times but > > now it only asks for it once. > > There are two separate things going on. cap remotely ssh''s on to the > remote server - ssh keys can prevent requiring entering a password here > - and then on the remote machine cap accesses your git repository. > > If you have told cap to access it as ssh:// etc.. then a password is > required for this also - so you need ssh shared keys between the > deployment server and the git repository.
Anyone have any ideas? On Jun 17, 2:42 am, Mike C <snib...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> But the deployment server and the git repository are the same server > in my case. What should I do? > > On Jun 17, 1:47 am, Andrew Porter <a...-OV3k8GMR8cdg9hUCZPvPmw@public.gmane.org> wrote: > > > Mike C wrote: > > > Er well it worked but it still asks for a password. You see, for doing > > > git push it used to ask for a password but it doesn''t anymore, and > > > using cap deploy:update_code used to ask for the password 3 times but > > > now it only asks for it once. > > > There are two separate things going on. cap remotely ssh''s on to the > > remote server - ssh keys can prevent requiring entering a password here > > - and then on the remote machine cap accesses your git repository. > > > If you have told cap to access it as ssh:// etc.. then a password is > > required for this also - so you need ssh shared keys between the > > deployment server and the git repository.
It would be the same if its local or remote you still have to setup ssh keys so that the user has access to ssh to localhost without password So if its the same user to deploy/run cap just add your pub key to your own .ssh/authorized_keys file... When this is done you should be able todo this ssh localhost and get no password the command to generate the keys is ssh-keygen -t dsa then enter enter you should now have a directory in ~/.ssh with a key file and the public key... add the pub key to a file ~/.ssh/authorized_keys set the permission to 600 (chmod 600 ~/.ssh/authorized_keys) then do ssh localhost On Jun 17, 1:09 pm, Mike C <snib...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Anyone have any ideas? > > On Jun 17, 2:42 am, Mike C <snib...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > But the deployment server and the git repository are the same server > > in my case. What should I do? > > > On Jun 17, 1:47 am, Andrew Porter <a...-OV3k8GMR8cdg9hUCZPvPmw@public.gmane.org> wrote: > > > > Mike C wrote: > > > > Er well it worked but it still asks for a password. You see, for doing > > > > git push it used to ask for a password but it doesn''t anymore, and > > > > using cap deploy:update_code used to ask for the password 3 times but > > > > now it only asks for it once. > > > > There are two separate things going on. cap remotely ssh''s on to the > > > remote server - ssh keys can prevent requiring entering a password here > > > - and then on the remote machine cap accesses your git repository. > > > > If you have told cap to access it as ssh:// etc.. then a password is > > > required for this also - so you need ssh shared keys between the > > > deployment server and the git repository.
Thanks a bunch, that did the trick. :) On Jun 17, 2:07 pm, heimdull <fre...-RCI/mp9mI1I6GGFevw1D/A@public.gmane.org> wrote:> It would be the same if its local or remote you still have to setup > ssh keys so that the user has access to ssh to localhost without > password > > So if its the same user to deploy/run cap just add your pub key to > your own .ssh/authorized_keys file... > > When this is done you should be able todo this ssh localhost and get > no password > > the command to generate the keys is ssh-keygen -t dsa then enter enter > > you should now have a directory in ~/.ssh with a key file and the > public key... add the pub key to a file ~/.ssh/authorized_keys set the > permission to 600 (chmod 600 ~/.ssh/authorized_keys) then do ssh > localhost > > On Jun 17, 1:09 pm, Mike C <snib...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > Anyone have any ideas? > > > On Jun 17, 2:42 am, Mike C <snib...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > But the deployment server and the git repository are the same server > > > in my case. What should I do? > > > > On Jun 17, 1:47 am, Andrew Porter <a...-OV3k8GMR8cdg9hUCZPvPmw@public.gmane.org> wrote: > > > > > Mike C wrote: > > > > > Er well it worked but it still asks for a password. You see, for doing > > > > > git push it used to ask for a password but it doesn''t anymore, and > > > > > using cap deploy:update_code used to ask for the password 3 times but > > > > > now it only asks for it once. > > > > > There are two separate things going on. cap remotely ssh''s on to the > > > > remote server - ssh keys can prevent requiring entering a password here > > > > - and then on the remote machine cap accesses your git repository. > > > > > If you have told cap to access it as ssh:// etc.. then a password is > > > > required for this also - so you need ssh shared keys between the > > > > deployment server and the git repository.