
아, 왜 Github에서 복제할 때 암호를 묻는 메시지가 표시되나요??
git clone [email protected]:test/testchef.git
Cloning into 'chef'...
The authenticity of host 'github.com (xxx.xxx.xxx.xxx)' can't be established.
RSA key fingerprint is 16:27:ac:a5:76:28:2d:36:63:1b:56:4d:eb:df:a6:48.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'github.com,xxx.xxx.xxx.xxx' (RSA) to the list of known hosts.
Enter passphrase for key '/root/.ssh/git_id_rsa.pub':
여기 내 SSH 구성 파일이 있습니다.
Host *github.com
IdentityFile ~/.ssh/git_id_rsa.pub
fabric에서 실행하면 오류가 발생하지 않지만 def bootstrap()을 복제하려고 하면 암호를 묻는 메시지가 표시됩니다. put('ssh_config','/root/.ssh/config') put('git_id_rsa.pub ','/root/.ssh/git_id_rsa.pub') put('git_id_rsa','/root/.ssh/git_id_rsa') run("""chmod 600 /root/.ssh/git_id_rsa*""") 실행 ("""eval ssh-agent -s
;ssh-add /root/.ssh/git_id_rsa""")
패브릭의 관련 출력:
[107.170.196.221] out: Agent pid 2285
[107.170.196.221] out: Identity added: /root/.ssh/git_id_rsa (/root/.ssh/git_id_rsa)
[107.170.196.221] out:
서버에 로그인하고 명령줄에서 아래를 실행합니다. eval ssh-agent -s
;ssh-add /root/.ssh/git_id_rsa git clone[이메일 보호됨]:테스트/testchef.git
..좋아요..암호를 묻지 않고도 복제할 수 있습니다. 왜 직물에서는 작동하지 않았습니까?
답변1
ID 파일은 공개 키가 아닌 개인 키이기 때문에:
Host *github.com
IdentityFile ~/.ssh/git_id_rsa # Without the .pub