Capistrano Deploys From Git HTTP Repo

Does anyone encounter deploying Capistrano from a Git repository over HTTP?

The following deploy.rb file does not work:

set :repository, 'http://git.repository-domain.com:4442/git/repo.git' set :scm_username, "git_username" set :scm_password, "git_password" set :scm, :git 

It works if you pass the repository as follows:

 set :repository, 'http://git_username: git_password@git.repository-domain.com :4442/git/repo.git' 

The latter only works as long as the user or password does not have special characters. The URL encoding of these characters will crash.

UPDATE : a more accurate description of the problem is available on the ticket https://github.com/capistrano/capistrano/issues/384

+4
source share
1 answer

Capistrano Git HTTPS authentication will be resolved in Capistrano 3, where you can install the repository and its credentials using:

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

In addition, what already works in Capistrano 3 is the username: password in the repository URL, even if the password contains special characters:

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

See https://github.com/capistrano/capistrano/tree/v3 for more details.

+13
source

All Articles