记录github ssh 下载代码失败解决过程
- windows机器下载airflow代码失败:
$ git clone git@github.com:apache/airflow.git Cloning into 'airflow'... @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY! Someone could be eavesdropping on you right now (man-in-the-middle attack)! It is also possible that a host key has just been changed. The fingerprint for the RSA key sent by the remote host is SHA256:XXXXXXXXXXXXXXXXXXXXXXX. Please contact your system administrator. Add correct host key in /c/Users/Administrator/.ssh/known_hosts to get rid of this message. Offending RSA key in /c/Users/Administrator/.ssh/known_hosts:1 RSA host key for github.com has changed and you have requested strict checking. Host key verification failed. fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists.
- C:\Users\Administrator\.ssh\known_hosts文件看起来有问题, 剪切到其他目录备份。再次重新执行变成了其他错误:
$ git clone git@github.com:apache/airflow.git Cloning into 'airflow'... The authenticity of host 'github.com (20.205.243.166)' can't be established. ECDSA key fingerprint is SHA256:XXXXXXXXXXXXXXXXXXXXXX Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added 'github.com,20.205.243.166' (ECDSA) to the list of known hosts. ERROR: You're using an RSA key with SHA-1, which is no longer allowed. Please use a newer client or a different key type. Please see https://github.blog/2021-09-01-improving-git-protocol-security-github/ for more information. fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists.
- github 不再支持rsa SHA-1. 找到这篇文章 https://blog.csdn.net/wangpaiblog/article/details/124416005。
查看C:\Users\Administrator\.ssh目录下的文件,已经存在id_ed25519,id_ed25519.pub。 删除老的key,将id_ed25519.pub文件的内容粘贴到new ssh key
https://github.com/settings/keys
- 再次执行,成功
$ git clone git@github.com:apache/airflow.git Cloning into 'airflow'... The authenticity of host 'github.com (20.205.243.166)' can't be established. ECDSA key fingerprint is SHA256:XXXXXXXXXXXXX. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added 'github.com,20.205.243.166' (ECDSA) to the list of known hosts. remote: Enumerating objects: 313044, done. remote: Counting objects: 100% (15710/15710), done. remote: Compressing objects: 100% (1845/1845), done. remote: Total 313044 (delta 15198), reused 14019 (delta 13862), pack-reused 297334 Receiving objects: 100% (313044/313044), 229.86 MiB | 143.00 KiB/s, done. Resolving deltas: 100% (232184/232184), done. Checking connectivity... done. Checking out files: 100% (7228/7228), done.
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 震惊!C++程序真的从main开始吗?99%的程序员都答错了
· winform 绘制太阳,地球,月球 运作规律
· 【硬核科普】Trae如何「偷看」你的代码?零基础破解AI编程运行原理
· 上周热点回顾(3.3-3.9)
· 超详细:普通电脑也行Windows部署deepseek R1训练数据并当服务器共享给他人