2012-01-04 111 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即可解决我所有的问题!