win10 git 命令行出現 no matching host key type found. Their offer: ssh-rsa 解決方案


背景:

win10電腦, 公私鑰都已經配置好。

 

一 現象:

1. 配置好公私鑰之后,仍然無法直接用 git ssh的方式,下載代碼。

2. 出現形如

   no matching host key type found. Their offer: ssh-rsa 的錯誤.

 

二. 解決方案:

C:\Users\walkerjiang\.ssh\config

 

增加以下二項

HostKeyAlgorithms ssh-rsa
PubkeyAcceptedKeyTypes ssh-rsa

最終如下:

Host git.oa.com
HostName git.oa.com
User xxxx  #用戶名
Port 12345  #真實端口
IdentityFile C:\Users\xxxxx\.ssh\私鑰名   
HostKeyAlgorithms ssh-rsa
PubkeyAcceptedKeyTypes ssh-rsa

 

解決問題來源參與:

https://www.linuxquestions.org/questions/linux-security-4/no-matching-host-key-type-found-their-offer-ssh-rsa-ssh-dss-4175701155/


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM