Has anyone experience with Capistrano deployment from a Git repository over HTTP?
The following deploy.rb is not working:
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 is working if you pass a repository in as following though:
set :repository, 'http://git_username:git_password@git.repository-domain.com:4442/git/repo.git'
The latter only works as long as either the username or password have no special chars. URL-encoding those chars will result in a failure.
UPDATE : a more precise description of the problem is available in the ticket at https://github.com/capistrano/capistrano/issues/384
Capistrano Git HTTPS authentication will be resolved in Capistrano 3 where you can set repository and its credentials with:
set :repo_url, 'https://git.repository-domain.com:4442/git/repo.git'
set :git_http_username, 'username'
set :git_http_password, 'password'
Also, what already works in Capistrano 3, is the username:password in the repository URL even if the password includes special characters:
set :repo_url, 'https://ain:3490jL?a@git.repository-domain.com:4442/git/repo.git'
For more up-to-date info see https://github.com/capistrano/capistrano
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.