2013-05-29 33 views
0

我已经设置了amazon EC2实例(工作)和Github回购(工作正常)。 当我尝试使用Github上回购部署应用EC2,我得到这个错误:无法使用git向EC2部署应用程序

** [IP] Permission denied (publickey). 
** [IP] fatal: Could not read from remote repository. 
** 
** Please make sure you have the correct access rights 
** and the repository exists. 

我缺少什么?我可以使用副本部署应用程序到EC,但不能使用github。

我需要设置公钥吗?

编辑:SETUP

set :application, "project_name" 
set :user, 'username' 
set :password, "password" 

set :domain, "IP.amazonaws.com" 
set :deploy_to, "/path_to_directory" 
set :use_sudo, false 

role :web, domain 
role :app, domain 
role :db, domain, :primary => true 

set :assets_role, [:app] 

default_run_options[:pty] = true 
set :repository, "[email protected]:user/repo.git" 
set :scm, "git" 

谢谢

回答

0

您没有设置EC2和Github的正确基础上的错误信息之间的SSH密钥,但考虑到您所提供的信息,无法提供建议。

问题 - 您是否在EC2服务器上设置了部署密钥?我假设您正尝试使用SSH代理转发从EC2服务器进行部署,而不是使用本地计算机进行部署。你可以做一个从EC2服务器到github账户的git pull吗?你可以ssh到[email protected](例如“ssh -T [email protected]”)吗?

下面的链接可以帮助您设置部署密钥或找出另一种管理部署的方式。

https://help.github.com/articles/deploying-with-capistrano

https://help.github.com/articles/managing-deploy-keys

+0

嗨威廉,谢谢你的回答。请检查出更新后的OP,我添加了有关部署的信息 – user984621

0

开始使用Capistrano的是尝试访问您的服务器,而它的时候一到调试访问权限的最佳途径。

相关问题