【问题标题】:ssh-agent, capistrano and forwarding keys to githubssh-agent、capistrano 和将密钥转发到 github
【发布时间】: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


    【解决方案1】:

    整个问题都是cygwin。我有一个链接到安装在 Windows c:\ 中的 ruby​​ 库的安装,我认为它试图使用不正确的密钥或根本找不到它,所以只需下载 ruby​​ 源并将其直接安装到 cygwin 即可解决我的所有问题!

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2011-11-01
      • 2021-06-23
      • 2019-10-09
      • 2021-04-03
      • 2019-01-17
      • 1970-01-01
      • 2020-06-18
      • 2023-03-15
      相关资源
      最近更新 更多