2013-02-18 186 views
2

我想知道为什么我的上限部署失败。Capistrano部署失败,“无法读取用户名”

我正在使用capistrano。

这里是我的deploy.rb:

set :application, "gppb" 
set :repository, "[email protected]:AppSource/gppb.git" 
set :scm, :git 
set :user, "gppb.com" 
set :deploy_to, "/home/gppb.com/apps/#{application}" 
set :use_sudo, false 
set :keep_releases, 5 
# 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, "test.gppb.appsource.biz"       # Your HTTP server, Apache/etc 
role :app, "test.gppb.appsource.biz"       # This may be the same as your `Web` server 
role :db, "test.gppb.appsource.biz", :primary => true # This is where Rails migrations will run 

# 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 
end 

这里是错误:

enter image description here

要查看完整图片点击这里 - >http://d.pr/i/wnIb

回答

1

看起来你应该将你的用户设置为“gppbv2”。这是服务器上远程用户的参数。另外,Unix用户名不能有句点。

+0

这应该写在deploy.rb文件里面吗? – xirukitepe 2013-02-18 03:06:27

+0

是的 - 你目前有:用户设置为“gppb.com”,这不是一个有效的用户名。 – platforms 2013-02-18 03:07:28

+0

我会尽力的。谢谢。我会尽快给您回复。 :) – xirukitepe 2013-02-18 03:08:11