Ruby on rails 卡皮斯特拉诺:不要询问密码
我有一个rails capistrano任务,它部署代码并工作,但是当它从我的服务器的git repo中检出代码时,它会两次请求密码,有没有办法通过将密码放入capistrano脚本来绕过这个问题?下面是代码示例Ruby on rails 卡皮斯特拉诺:不要询问密码,ruby-on-rails,git,capistrano,Ruby On Rails,Git,Capistrano,我有一个rails capistrano任务,它部署代码并工作,但是当它从我的服务器的git repo中检出代码时,它会两次请求密码,有没有办法通过将密码放入capistrano脚本来绕过这个问题?下面是代码示例 set :repository, "ssh://gituser@example.com/opt/git/hub/app.git" set :deploy_via, :copy # server stuff unrelated.. set :user, "deployer" se
set :repository, "ssh://gituser@example.com/opt/git/hub/app.git"
set :deploy_via, :copy
# server stuff unrelated..
set :user, "deployer"
set :password, "password"
顺便说一句,我正在使用capistrano 2。谢谢。ssh工具通常支持您的客户端,并且从不允许在命令行上使用密码 查找“无密码SSH”。您将生成一个公钥和私有代码~/.ssh/id\u rsa.pub和~/.ssh/id\u rsa。这足以让你在谷歌上搜索;您将把密钥和代码上载到服务器,然后将密钥上载到GIT存储库(按照其所有者的指示)