簡體   English   中英

Capistrano 從 Git HTTP 倉庫部署

[英]Capistrano deploy from Git HTTP repo

有沒有人有通過 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/384的票證中找到

Capistrano Git HTTPS 身份驗證將在 Capistrano 3 中解決,您可以在其中設置存儲庫及其憑據:

set :repo_url, 'https://git.repository-domain.com:4442/git/repo.git'
set :git_http_username, 'username'
set :git_http_password, 'password'

此外,在 Capistrano 3 中已經有效的是存儲庫 URL 中的用戶名:密碼,即使密碼包含特殊字符也是如此:

set :repo_url, 'https://ain:3490jL?a@git.repository-domain.com:4442/git/repo.git'

有關更多最新信息,請參閱https://github.com/capistrano/capistrano

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM