capistrano - git ls-remote -h doesn't have the git url

吃可爱长大的小学妹 提交于 2019-12-10 10:48:50

问题


I'm new to using Capistrano. I set it up correctly, but when I run cap staging deploy I get this -

DEBUG [b678d5eb] Command: ( GIT_ASKPASS=/bin/echo GIT_SSH=/tmp/myproj/git-ssh.sh /usr/bin/env git ls-remote -h  )
DEBUG [b678d5eb]    usage: git ls-remote [--heads] [--tags]  [-u <exec> | --upload-pack <exec>] <repository> <refs>...
DEBUG [b678d5eb] Finished in 0.325 seconds with exit status 129 (failed).

I think the git clone url should follow after the -h, but I'm not sure.

I'm using Capistrano 3.2.1. Here's my deploy.rb -

lock '3.2.1'
set :application, 'myproj'
set :repository, 'https://vrao@git.test.com/scm/~vrao/myproj.git'
set :scm_passphrase, 'blah'

Any help would be great.


回答1:


Never mind, I was following the documentation for capistrano 2x, while I have 3.2.1 installed.

For anyone who might face the same issue, in capistrano 2x you specify the git repo by setting the repository variable, while in 3x it's been changed to repo_url. I changed it and now it works fine. Here's the documentation I would recommend to follow for 3x - http://capistranorb.com/documentation/getting-started/installation/



来源:https://stackoverflow.com/questions/23938297/capistrano-git-ls-remote-h-doesnt-have-the-git-url

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!