2012-01-04 131 views
0

我在Capistrano部署中遇到了一個很奇怪的問題,我的同事機器工作正常,但我的拒絕播放很好。ssh-agent,capistrano和轉發github的密鑰

我正在使用cygwin,並有一個外部的紅寶石安裝。

我們在我們的服務器上使用root用戶,並在./ssh/authorized_keys2中添加了ssh-keys,它允許我部署ssh到服務器。

嘗試將子模塊克隆到遠程緩存時,問題就變得很明顯。我總是得到公鑰被拒絕的錯誤。

下面是部署文件:

# What is the name of the local application? 
set :application, "domain" 

# What user is connecting to the remote server? 
set :user, "root" 

# Where is the local repository? 
set :repository, "file:///blah.git" 
set :local_repository, " ssh://blah.git" 

# What is the production server domain? 
role :web, "vserver" 

# What remote directory hosts the production website? 
set :deploy_to, "/home/<user>/public_html/" 

# Is sudo required to manipulate files on the remote server? 
set :use_sudo, false 

# What version control solution does the project use? 
set :scm,  :git 
set :branch,  'master' 

# How are the project files being transferred? 
set :deploy_via, :remote_cache 

# Maintain a local repository cache. Speeds up the copy process. 
set :copy_cache, true 

# Ignore any local files? 
set :copy_exclude, %w(.git,deployment,.project) 

#enabled submodules 
set :git_enable_submodules, 1 

set :group_writable, false 

set :ssh_options, {:forward_agent => true} 

我知道我將不會包括足夠的信息,只是讓我知道需要什麼填補空白,因爲它是慢慢地讓我瘋狂,爲什麼我的失敗,我的同事們完美的作品。任何幫助將是偉大的,我一直在這裏和其他各種來源整天看,沒有任何東西排序這個問題。

回答

0

與此有關的整個問題是cygwin。我有一個安裝,鏈接到安裝在Windows c:\的ruby庫,我認爲它然後嘗試使用不正確的鍵或根本沒有找到它,所以只需下載ruby源代碼並直接安裝到cygwin即可解決我所有的問題!