我已经设置了亚马逊 EC2 实例(工作)和 Github 存储库(工作良好)。当我尝试使用 Github 存储库将应用程序部署到 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.
我错过了什么?我可以使用copy将应用程序部署到 EC ,但不能使用 github。
我需要什么来设置公钥?
编辑:设置
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, "git@github.com:user/repo.git"
set :scm, "git"
谢谢