Εμφάνιση αναρτήσεων με ετικέτα ssh mercurial. Εμφάνιση όλων των αναρτήσεων
Εμφάνιση αναρτήσεων με ετικέτα ssh mercurial. Εμφάνιση όλων των αναρτήσεων

Παρασκευή 6 Αυγούστου 2010

kapistrano + mercurial me timbers

Ok so you will be bugged once more.

I have decided to use capistrano to upload one of my projects in symfony to cpanel.

The source control i am using is mercurial, oh wes we love mercurial.

So i set my control source to reploy.rb to mercurial with http authentication.

oh god why did i do that.

i searched the internets trying to find for answer 'how to authenticate capistrano with http method'.

my deploy.rb looked like this

####use this for the command prompt to work
default_run_options[:pty] = true

set :repository, "http://my_host/mercurial/my_project"
set :scm, :mercurial
set :scm_prefer_prompt, :true

so i run the cap deploy:cold

http authentication appears, welcome to my mercurial repo blah blah.
username:

my_user

i am hitting the enter and nothing happens, so i say its ok i will search inputs in ruby, internet failed us. so i am thinking what to do what to do
and it hits me instead of the http lets use the ssh method to retrieve from mercurial.


so i enter these options to my deploy.rb.

default_run_options[:pty] = true

#####local
set :repository, "ssh://my_user@my_host//my_path_to_the_repo/my_project"
set :scm, :mercurial
set :scm_prefer_prompt, :true

and voila cap deploy:cold

asks for ssh password and hg asks for another password.
my_user connects through ssh and retrieves the mercurial repo.


and if for some reason you need to set the ssh port this is the command you should put in capistrano config.

ssh_options[:port] = 22000


i hope you haven't been bugged too much.