my/local/rails/app/directory$cap deploy triggering load callbacks * 2013-08-30 15:51:20 executing `deploy' * 2013-08-30 15:51:20 executing `deploy:update' ** transaction: start * 2013-08-30 15:51:20 executing `deploy:update_code' updating the cached checkout on all servers executing locally: "git ls-remote ssh://[email protected]/var/repos/test.git master" command finished in 684ms * executing "if [ -d /var/www/test/www/shared/cached-copy ]; then cd /var/www/test/www/shared/cached-copy && git fetch origin && git fetch --Tags origin && git reset --hard 9de1df43a7959b953dc0b35c2ab27ba84698602a && git clean -d -x -f; else git clone -b master ssh://[email protected]/var/repos/test.git /var/www/test/www/shared/cached-copy && cd /var/www/test/www/shared/cached-copy && git checkout -b deploy 9de1df43a7959b953dc0b35c2ab27ba84698602a; fi" servers: ["myserver.com"] [myserver.com] executing command ** [myserver.com :: out] cloning into '/var/www/test/www/shared/cached-copy'... ** [myserver.com :: out] ** [myserver.com :: out] [email protected]'s password:Password: ** [myserver.com :: out] ** [myserver.com :: out] Permission denIEd,please try again. ** [email protected]'s password:Password: ** [myserver.com :: out] ** [myserver.com :: out] Permission denIEd,please try again. ** [email protected]'s password:Password: ** [myserver.com :: out] ** [myserver.com :: out] Permission denIEd (publickey,password). ** fatal: Could not read from remote repository. ** ** Please make sure you have the correct access rights ** and the repository exists. command finished in 18891ms*** [deploy:update_code] rolling back * executing "rm -rf /var/www/test/www/releases/20130830225140; true" servers: ["myserver.com"] [myserver.com] executing command command finished in 700msFailed: "rvm_path=/usr/local/rvm /usr/local/rvm/bin/rvm-shell 'ruby-2.0.0-p247' -c 'if [ -d /var/www/test/www/shared/cached-copy ]; then cd /var/www/test/www/shared/cached-copy && git fetch origin && git fetch --Tags origin && git reset --hard 9de1df43a7959b953dc0b35c2ab27ba84698602a && git clean -d -x -f; else git clone -b master ssh://[email protected]/var/repos/test.git /var/www/test/www/shared/cached-copy && cd /var/www/test/www/shared/cached-copy && git checkout -b deploy 9de1df43a7959b953dc0b35c2ab27ba84698602a; fi'" on myserver.com
当我在其中输入密码时,说权限被拒绝,我确定密码是正确的.这是我的deploy.rb
require 'bundler/cAPIstrano'require 'rvm/cAPIstrano'set :user,'user'set :domain,'myserver.com'set :application,"blog"set :repository,"ssh://[email protected]/var/repos/test.git"set :scm_passphrase,"password"set :deploy_to,'/var/www/test/www'set :deploy_via,:remote_cacheset :scm,:gitset :branch,'master'set :scm_verbose,trueset :use_sudo,falseset :normalize_asset_timestamps,falseset :rails_env,:productionset :rvm_type,:systemset :rvm_ruby_string,'ruby-2.0.0-p247'# set :scm,:git # You can set :scm explicitly or CAPIstrano will make an intelligent guess based on kNown version control directory names# Or: `accurev`,`bzr`,`cvs`,`darcs`,`git`,`mercurial`,`perforce`,`subversion` or `none`role :web,domain # Your http server,Apache/etcrole :app,domain # This may be the same as your `Web` serverrole :db,domain,:primary => true # This is where Rails migrations will rundefault_run_options[:pty] = truessh_options[:forward_agent] = trueafter "deploy","deploy:migrate","deploy:restart"after "deploy:update","deploy:restart"# if you want to clean up old releases on each deploy uncomment this:# after "deploy:restart","deploy:cleanup"# if you're still using the script/reaper helper you will need# these http://github.com/rails/irs_process_scripts# If you are using Passenger mod_rails uncomment this:# namespace :deploy do# task :start do ; end# task :stop do ; end# task :restart,:roles => :app,:except => { :no_release => true } do# run "#{try_sudo} touch #{file.join(current_path,'tmp','restart.txt')}"# end# endnamespace :deploy do desc "cause Passenger to restart" task :restart do run "touch #{current_path}/tmp/restart.txt" endend
我可以使用ssh密钥从命令行ssh到我的服务器,以便工作正常.谁知道问题是什么?谢谢.
解决方法 这在过去对我有用.希望这对你有用:ssh-add /.ssh/ID_rsa总结
以上是内存溢出为你收集整理的ruby-on-rails – 为什么我尝试限制部署时会收到“权限被拒绝”?全部内容,希望文章能够帮你解决ruby-on-rails – 为什么我尝试限制部署时会收到“权限被拒绝”?所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)