开发者

git clone stuck during a Capistrano deploy

开发者 https://www.devze.com 2023-03-12 15:16 出处:网络
I am currently struggling with Capistrano and Git. Here is my setup first: Production server under Windows Server 2003, msysgit installed.

I am currently struggling with Capistrano and Git. Here is my setup first:

  • Production server under Windows Server 2003, msysgit installed.
  • Development machine under Windows 7, using Aptana for development

Yes, I know, Windows everywhere. But I have to deal with that for the moment.

So, my problem is : during a Capistrano deploy attempt, the git clone command gets stuck. It just displays the following message, but nothing happens next.

Here is the command launched by Capistrano:

git clone ssh://user@www.server.fr/Git_Repositories/MyApp /u/apps/MyApp/releases/20110614124655

And here is the result:

** [www.myserver.fr :: out] Cloning into /u/apps/MyApp/releases/20110614124655...

I looked into the /u/apps/MyApp/releases/20110614124655 folder that was created by Capistrano, and the only thing I can find in there is the .git folder. So the git clone command did succeed to initialize an empty repository, I guess.

So I ran a few tests to find where the problem is:

  • I am able to run the git clone command succesfully on my server, if I log in using Remote Desktop Connection and then run the command in a Git prompt.
  • I am not able to run the git clone command on 开发者_JAVA技巧my server via ssh. I get exactly the same result than when I run cap deploy from my development machine

So I guess there is some kind of problem somewhere between Git and SSH.

And here is my deploy.rb file, maybe it could help:

set :application, "ADM"
set :repository, "ssh://user@www.server.fr/Git_Repositories/MyApp"

set :scm, :git

default_run_options[:pty] = true
ssh_options[:forward_agent] = true

set :scm_username, "git_user"
set :user, "user"
set :branch, "master"
set :scm_verbose, true

role :web, "www.server.fr"
role :app, "www.server.fr"                 
role :db,  "www.server.fr", :primary => true

Thanks!

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号