ssh 連線錯誤
問題:
[email protected]:~/mygit/mygerrit$ git clone ssh://[email protected]:29418/useful-project && scp -p -P 29418 [email protected]:hooks/commit-msg useful-project/.git/hooks/
Cloning into 'useful-project'... @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!
解決辦法:
[email protected]:~/mygit/mygerrit$ ssh-keygen -f "/home/sarah/.ssh/known_hosts" -R [172.29.40.154]:29418
# Host [172.29.40.154]:29418 found: line 17 type RSA /home/sarah/.ssh/known_hosts updated. Original contents retained as /home/sarah/.ssh/known_hosts.old
[email protected]:~/mygit/mygerrit$ git clone ssh://[email protected]:29418/useful-project && scp -p -P 29418 [email protected]:hooks/commit-msg useful-project/.git/hooks/
Cloning into 'useful-project'... The authenticity of host '[172.29.40.154]:29418 ([172.29.40.154]:29418)' can't be established. RSA key fingerprint is 0d:7d:d1:b6:af:26:28:91:d7:d8:13:bb:a8:86:e2:e0. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added '[172.29.40.154]:29418' (RSA) to the list of known hosts. Checking connectivity... done. warning: remote HEAD refers to nonexistent ref, unable to checkout. commit-msg