2012-01-26 57 views
1

我的設置與Gitosis的服務器(YUM安裝Gitosis的版本(CentOS 6.2)),並配置我的deploy.rb如下:的Git上的gitosis要求密碼從capifony

set :application, "uda" 
set :domain,  "10.0.0.59" 
set :deploy_to, "/var/www/html/" 
set :app_path, "app" 

set :user,  "root" 
set :use_sudo, false 
#default_run_options[:pty] = true 
ssh_options[:port] = 22 
set :php_bin, "/usr/bin/php" 

set :repository, "[email protected]:uda.git" 
set :scm,   :git 

set :branch,  "master" 

role :web,  domain       # Your HTTP server, Apache/etc 
role :app,  domain       # This may be the same as your `Web` server 
role :db,   domain, :primary => true  # This is where Rails migrations will run 

set :update_vendors, true 

set :keep_releases, 5 

# 
# ssh_options[:forward_agent] = true 
# set :model_manager, "doctrine" 

set :shared_files,  ["app/config/parameters.ini"] 
set :shared_children,  [app_path + "/logs", web_path + "/uploads", "vendor"] 

當我啓動與帽部署要求爲密碼。 Gitosis沒有任何密碼,所以我想要求root密碼。 I'm得到這個:

==> cap deploy 
    * executing `deploy' 
    * executing `deploy:update' 
** transaction: start 
    * executing `deploy:update_code' 
    executing locally: "git ls-remote [email protected]:uda.git master" 
/Users/gitek/.ssh/config line 2: garbage at end of line; "#". 
fatal: The remote end hung up unexpectedly 
*** [deploy:update_code] rolling back 
    * executing "rm -rf /var/www/html/releases/20120126081107; true" 
    servers: ["gureak-akademi.grupogureak.com"] 
Password: 
    [gureak-akademi.grupogureak.com] executing command 
    command finished in 58ms 
Command git ls-remote [email protected]:uda.git master returned status code 32768 

無論如何,如果我通過ssh連接到服務器並啓動

[email protected] ~]# git ls-remote [email protected]:uda.git master 
[email protected]'s password: 

它keekps要求輸入密碼...

任何幫助或線索?

回答

2

檢查〜/ .ssh/authorized_keys文件有id_rsa.pub內容