【发布时间】:2013-01-10 08:50:34
【问题描述】:
有没有人通过 HTTP 从 Git 存储库部署 Capistrano 的经验?
以下 deploy.rb 不起作用:
set :repository, 'http://git.repository-domain.com:4442/git/repo.git'
set :scm_username, "git_username"
set :scm_password, "git_password"
set :scm, :git
如果您按以下方式传递存储库,它会起作用:
set :repository, 'http://git_username:git_password@git.repository-domain.com:4442/git/repo.git'
后者仅在用户名或密码没有特殊字符时才有效。对这些字符进行 URL 编码将导致失败。
更新:在https://github.com/capistrano/capistrano/issues/384https://github.com/capistrano/capistrano/issues/384的票证中提供了更准确的问题描述
【问题讨论】:
-
为什么为什么为什么!这让我非常沮丧! ;)
-
你是指 HTTP 上的 repo?
-
http 位。为什么不能使用 https?
-
可能。不过,我从来没有在 https 上部署过 cap。尽管使用它安装宝石没有问题。我想知道您是否可以尝试不使用 scm_username 和密码,或者更改为 https
-
如果您使用 VPN 服务器,我有解决方案如何通过 ssh 协议进行部署。如果你需要我可以回答。
标签: ruby-on-rails git http deployment capistrano