Git

複製是否危險,警告永久添加’‘到已知主機列表?

  • April 11, 2019

我試圖從 github 複製 repo(看看 Golang 和 react 如何協同工作)

git clone git@git.bec-systems.com:cbrake/goreact.git $GOPATH/src/github.com/cbrake/goreact
Cloning into '/home/miki/go/src/github.com/cbrake/goreact'...
The authenticity of host 'git.bec-systems.com (159.65.229.70)' can't be established.
ECDSA key fingerprint is SHA256:CzPCk6/fsCvAD1xG9GiHswVWHyOvB0/UD7da7CWzTTk.
Are you sure you want to continue connecting (yes/no)? y
Please type 'yes' or 'no': yes
Warning: Permanently added 'git.bec-systems.com,159.65.229.70' (ECDSA) to the list of known hosts.
git@git.bec-systems.com: Permission denied (publickey).
fatal: Could not read from remote repository.

對我有什麼影響嗎?git被添加到已知主機列表中是什麼意思?

SSH 伺服器使用證書向客戶端標識自己。當您第一次連接known_hosts時,如果有人竊取該域並嘗試將您重定向到其他 ip,您將從那時開始添加指紋,他將需要獲取您保存的伺服器證書的副本,否則 ssh 將因伺服器證書更改而死。參考

引用自:https://serverfault.com/questions/962584