【发布时间】:2012-02-02 14:55:58
【问题描述】:
我在部署 Capistrano 时遇到了一个很奇怪的问题,我同事的机器工作正常,但我的机器拒绝运行良好。
我正在使用 cygwin 并且有一个外部 ruby 安装。
我们在我们的服务器上使用 root 用户,并已将 ssh-keys 添加到 ./ssh/authorized_keys2,这允许我部署和 ssh 到服务器中。
当尝试将子模块克隆到远程缓存时,问题变得很明显。我总是收到错误 publickey denied.
下面是部署文件:
# 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}
我意识到我没有提供足够的信息,只是让我知道需要填补哪些空白,因为这让我慢慢发疯,为什么我的失败而我的同事工作完美无瑕。任何帮助都会很棒,我整天都在寻找这里和其他各种来源,但没有任何东西可以解决这个问题。
【问题讨论】:
标签: ssh github capistrano ssh-keys