我正在嘗試基於capifony和Symfony2做Symfony 2項目部署Web應用程序。身份驗證失敗,首選
它使用過程來觸發我的「帽子部署」任務,並顯示我的輸出在Web瀏覽器。當我在shell中運行我的「cap deploy」作爲用戶www-data(與Process所使用的相同)時,我的deployement可以正常工作,因此我的部署任務和身份驗證密鑰都沒有任何問題。 雖然,當我從我的web應用程序調用我的任務時,capifony告訴我它無法在遠程服務器上進行身份驗證。
triggering start callbacks for `deploy'
* executing `deploy:setdomain'
* executing `deploy'
* executing `deploy:update'
** transaction: start
* executing `deploy:update_code'
triggering before callbacks for `deploy:update_code'
[32m--> Updating code base with checkout strategy[0m
executing locally: "git ls-remote [ myrepo ]"
command finished in 2068ms
* executing "git clone -q -o [ remote server ] [ my repo ]
/var/www/spinfony/releases/20121211100449 && cd /var/www/spinfony/releases/20121211100449 && git checkout -q -b deploy be53233e51a4c542c3bc8603b424e57f988898a4 && (echo be53233e51a4c542c3bc8603b424e57f988898a4 > /var/www/spinfony/releases/20121211100449/REVISION)"
servers: ["[ remote server ]"]
Password: stty: standard input: Invalid argument
stty: standard input: Invalid argument
stty: standard input: Invalid argument
*** [deploy:update_code] rolling back
* executing "rm -rf /var/www/spinfony/releases/20121211100449; true"
servers: ["[ remote server ]"]
** [deploy:update_code] exception while rolling back: Capistrano::ConnectionError, connection failed for: [ remote server ] (Net::SSH::AuthenticationFailed: [ user ])
connection failed for: [ remote server ] (Net::SSH::AuthenticationFailed: [ user ])
我試圖找出爲什麼capifony似乎想到了密碼,我不能提供,因爲我不是一個shell中運行它,而當我從一個shell中運行它,它工作正常不問我什麼。
再一次從同一個用戶調用同一個文件。
它工作的很好! – user1892216