0
capistrano로 내 응용 프로그램을 배포하려고하는데 문제가 있습니다. 내 컴퓨터는 ec2 아마존이고 .pem은 로컬에 있습니다. 나는 SSH를하고 문제없이 명령을 실행하지만, 캡 생산 배포를 위해 나는 다음과 같은 오류 얻을 수 있습니다, 내가 가진 내 생산/deploy.rb에Capistrano deploy - 사용 권한이 거부되었습니다.
DEBUG [4f4633f7] Command: (export GIT_ASKPASS="/bin/echo" GIT_SSH="/tmp/git-ssh-hybrazil-production-ronanlopes.sh" ; /usr/bin/env git ls-remote --heads [email protected]@github.com:fneto/hybrazil.git)
DEBUG [4f4633f7] Permission denied (publickey).
DEBUG [4f4633f7]
DEBUG [4f4633f7] fatal: Could not read from remote repository.
DEBUG [4f4633f7]
DEBUG [4f4633f7]
DEBUG [4f4633f7] Please make sure you have the correct access rights
DEBUG [4f4633f7]
and the repository exists.
DEBUG [4f4633f7]
을 이런 식으로 설정 :
set :ssh_options, {
keys: %w(/home/ronanlopes/Pems/hybrazil-impulso.pem ~/.ssh/id_rsa),
forward_agent: true,
auth_methods: %w(publickey)
}
어떤 아이디어? 미리 감사드립니다! PEM없이,
코드에서ssh-add ~/.ssh/id_rsa
당신이 SSH 키에 대한 전체 경로를 사용해야합니다 :
당신은 에이전트에 키를 추가 할 수 있습니다