2017-04-24 4 views
0

capistrano를 사용하여 로컬 서버에 레일 응용 프로그램을 배포하려고합니다. 그러나 서버가 외부 (인터넷)로 ssh 연결할 수 없기 때문에 배포 파일에서 [email protected]:sample/repo.git을 repo url로 사용할 수 없습니다. 대신 https://[email protected]:sample/repo.git을 사용합니다. 하지만 내가 cap production deploy을 실행할 때 잘못된 사용자 이름 또는 암호 오류가 발생합니다. 다음은 그것이 scm_password 필드를 사용하지 않는 경우 capistrano를 통한 https 배포

lock "3.8.1" 

set :scm, :git 
set :application, "sample" 
set :scm_username, "user" 
set :scm_password, "password" 
set :repo_url, "https://[email protected]:sample/repo.git" 

set :branch, "production" 

set :deploy_to, "/home/deploy/sample" 

내가 (예 : 그 캡 암호 나 요청을 만들 수

내 deploy.rb 파일입니다

답변

1

변경 :.

set :scm_username, "user" 
set :scm_password, "password" 

~

set :git_http_username, "user" 
set :git_http_password, "password" 

또한 사용자 이름/비밀번호 예 : URL :

set :repo_url, "https://user:[email protected]:sample/repo.git"