私はcapistrano経由で私のソースコードを配布したいサーバーを持っています。 私はこのサーバ上のssh経由でデプロイメントユーザにアクセスできますが、実際にはhttps経由でしかアクセスできないリポジトリにアクセスできます。 私は医者capistrano 3.5 use git https repo
ステージングカピストラーノ3.5と
キャップが変数に次のように示して使用しています。標準キャップ以上のものがあるかもしれませんが、彼らがしていることは明らかです。
変数
:application "capistrano_deployment"
:branch "master"
:default_env {}
:deploy_prefix ""
:deploy_root "/var/www"
:deploy_to "/var/www/capistrano_deployment"
:format :airbrussh
:git_environmental_variables {:git_askpass=>"/bin/echo", :git_ssh=>"/tmp/capistrano_deployment/git-ssh.sh"}
:keep_releases 5
:local_user "myuser"
:log_level :debug
:pty true
:repo_url "https://[email protected]/git/capistrano_deployment.git"
:scm :git
:stage :staging
:target_directory "capistrano_deployment"
:tmp_dir "/tmp"
カピストラーノはカピストラーノはに思えるようHTTPSとないによってアクセスされ、gitのためのパスワードをこのリポジトリを掲載していませんので、私は持っている問題は、展開が失敗したということですssh経由で想定してください。うまくいけば、一度だけではなくカピストラーノによって実行されるすべてのGitのクエリのために - 私はHTTPSのURLのパスワードを求めることカピストラーノを変更する必要がありますどのような
INFO [ce69c094] Running /usr/bin/env git ls-remote --heads https://[email protected]/git/capistrano_deployment.git as [email protected]…
DEBUG [ce69c094] Command: (export GIT_ASKPASS="/bin/echo" GIT_SSH="/tmp/capistrano_deployment/git-ssh.sh" ; /usr/bin/env git ls-remo…
DEBUG [ce69c094] fatal: Authentication failed for 'https://[email protected]/git/capistrano_deployment.git/'
? また、.netrcにユーザ名とパスワードを平文で配備するという解決策があるようです。すべて、残念ながら
ask :git_http_password
:
set :git_http_password, "secret"
するか、このようなことのためにカピストラーノをユーザーに求める: