Capistrano deploy from Git HTTP repo
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:[email protected]:4442/git/repo.git'
For more up-to-date info see https://github.com/capistrano/capistrano
Ain Tohvri
Applying DevOps to solve human problems by code. Enjoying Ruby on Rails, Node.js, Edge Computing. Contributor & maintainer of various Free and Open Source Software projects.
Updated on June 04, 2022Comments
-
Ain Tohvri almost 2 years
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:[email protected]: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
-
Pieter Vogelaar almost 5 yearsIt's git_http_username and git_http_password, without the "s" according to github.com/capistrano/capistrano/…