이전에이 질문을 게시했지만 그 대답은 더 이상 작동하지 않습니다.가능성있는 bitbucket 복제본 repo provisioning ssh 오류
요약하면, Anerve를 사용하여 나의 방황 상자를 프로비저닝 할 때 ssh를 사용하여 bitbucket 개인 저장소를 복제하려고 할 때 신비한 오류가 발생합니다. "Permission denied (publickey)"오류가 표시됩니다.
그러나 만약 내가 sg를 침범 한 다음 'git clone'명령을 실행하면 개인 repo가 성공적으로 복제됩니다. 이는 ssh 전달 에이전트가 실제로 작동하고있는 것을 나타내며, 변경 상자는 bitbucket repo와 관련된 개인 키에 액세스 할 수 있습니다.
나는이 문제에 대해 이틀 동안 고생하고 있으며 내 마음을 잃어 가고있다! 제발, 누군가 나를 도와주세요 !!!
Vagrantfile은 다음과
Vagrant.configure("2") do |config|
config.vm.box = "ubuntu/xenial64"
config.vm.network "private_network", ip: "192.168.33.14"
config.ssh.forward_agent = true
config.vm.provider "virtualbox" do |vb|
vb.memory = "1824"
end
# Only contains ansible dependencies
config.vm.provision "shell",
inline: "sudo apt-get install python-minimal -y"
end
내 playbook.yml가 될 때 :
---
- hosts: all
become: true
tasks:
- name: create /var/www/ directory
file: dest=/var/www/ state=directory owner=ubuntu group=www-data mode=0755
- name: Add the user 'ubuntu' to group 'www-data'
user:
name: ubuntu
shell: /bin/bash
groups: www-data
append: yes
- name: Clone [My-Repo] bitbucket repo
become: false
git:
repo: [email protected]:[Username]/[My-Repo].com.git
dest: /var/www/poo
version: master
accept_hostkey: yes
오류 메시지 : ansible-작전 playbook.yml을
fatal: [192.168.33.14]: FAILED! => {"changed": false, "cmd": "/usr/bin/git clone --origin origin '' /var/www/poo", "failed": true, "msg": "Cloning into '/var/www/poo'...\nPermission denied (publickey).\r\nfatal: Could not read from remote repository.\n\nPlease make sure you have the correct access rights\nand the repository exists.", "rc": 128, "stderr": "Cloning into '/var/www/poo'...\nPermission denied (publickey).\r\nfatal: Could not read from remote repository.\n\nPlease make sure you have the correct access rights\nand the repository exists.\n", "stderr_lines": ["Cloning into '/var/www/poo'...", "Permission denied (publickey).", "fatal: Could not read from remote repository.", "", "Please make sure you have the correct access rights", "and the repository exists."], "stdout": "", "stdout_lines": []}
,691 363,210
추가 정보 :
- 내 컴퓨터에 -l 연관된의 bitbucket의 환매 특약 키를 포함 않습니다 ssh를 추가합니다.
- sag-add -l에는 해당 bitbucket repo 키가 포함되어 있습니다 (ssh 전달을 통해). 방랑 상자 내에서 수동으로 수행하는 경우
그러나 작품을 복제? :
vagrant ssh
git clone [email protected]:myusername/myprivaterepo.com.git
Then type "yes" to allow the RSA fingerprint to be added to ~/.ssh/known_hosts (as its first connection with bitbucket)
모든 악몽을 읽어 주셔서 감사합니다.
"호스트 키 확인"에 실패했지만 "Permission denied (publickey)"오류가 표시됩니다. 어쩌면 중복 질문을 게시하는 대신 원래 질문의 사람들과 의견을 나눠보십시오. – larsks
이 질문은 중복되지는 않지만 새로운 질문입니다. 이전 질문은 playbook.yml에 "become : false"행을 포함하여 해결되었습니다. 이것은 내가 작성한 다른 스레드에없는 새로운 오류 메시지입니다. 중복 된 상태를 제거하십시오. 고맙습니다. – GustavMahler