GIT 私钥配置
1. 私钥生成

生成私钥命令
ssh-keygen -t rsa -C "邮箱地址" -f "秘钥路径" // -f 与秘钥路径可以不用, 默认在 C:\Users\Administrator\.ssh 中
下图是 生成私钥后的文件
用Notepad++ 高级笔记本 打开id_rsa.pub 复制全部内容
2. GitLab 配置
用户 -> Settings -> SSH
3. 注意
遇到私钥异常的话 将C:\Users\Administrator.ssh 中的所有文件删除 重新生成私钥
本人遇到这种问题 是 known_host 的问题 将全部文件 删除就可以, 重新生成 私钥 重新配置 就可以
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ 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 ED25519 key sent by the remote host is SHA256:dWfthN697e9zbRcWcVkLM5W4mvrJGDF0ZFSSkLATqYk. Please contact your system administrator. Add correct host key in /c/Users/Administrator/.ssh/known_hosts to get rid of this message. Offending ECDSA key in /c/Users/Administrator/.ssh/known_hosts:6 Host key for 192.168.1.22 has changed and you have requested strict checking. Host key verification failed. Could not read from remote repository. Please make sure you have the correct access rights and the repository exists.