Capistrano一直要求我为每一个贪婪的人提供密码。怎么做 我不是让它发生?
ruby版本1.8.7 REE
capistrano版本2.5.19
这是我的capfile和目录权限。
Everything up-to-date
** transaction: start
* executing `deploy:update_code'
updating the cached checkout on all servers
executing locally: "git ls-remote g...@github.com:username/
app_name.git master"
* executing "if [ -d /var/www/app_name/shared/cached-copy ]; then
cd /var/www/app_name/shared/cached-copy && git fetch -q origin && git
reset -q --hard 5d47453e28385200daa971ca4982632caf7fb67e && git clean -
q -d -x -f; else git clone -q g...@github.com:username/app_name.git /
var/www/app_name/shared/cached-copy && cd /var/www/app_name/shared/
cached-copy && git checkout -q -b deploy
5d47453e28385200daa971ca4982632caf7fb67e; fi"
servers: ["1xx.2xx.xxx.xxx"]
Password:
[173.230.158.13] executing command
command finished
更新
好的,我处在一个非常糟糕的混乱中,现在我收到了这个错误。
我添加了一个像“..”这样的“部署”用户。
adduser --system --home /home/deploy --shell /bin/bash --ingroup nogroup deploy
chmod u+w /etc/sudoers
echo "deploy ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
chmod u-w /etc/sudoers
然后我在.ssh / config文件中添加了你提到的配置。
Host prod
Hostname xxx.xxx.xxx.xx
User deploy
ForwardAgent yes
请帮忙!
答案 0 :(得分:3)
Github可能会要求您提供密码,因为从服务器连接时它没有获取您的密码。在~/.ssh/config
:
Host my_deploy_server
Hostname 1.2.3.4
User deploy
ForwardAgent yes
Host *
ForwardAgent no
答案 1 :(得分:1)
这可能是您服务器的密码。尝试在部署的计算机和目标服务器之间设置共享密钥。