解决window拉取git仓库报错Unable to negotiate with **** port 22: no matching host key type found.

window电脑重装系统后发现2年前的托管到微信代码管理平台的项目突然不能使用ssh克隆到本地了
控制台提示

Unable to negotiate with 118.89.100.150 port 22: no matching host key type found. Their offer: ssh-rsa
fatal: Could not read from remote repository.

解决方案:
在生成公钥的文件夹里(一般在当前用户目录下的.ssh文件中)创建一个config文件(没有后缀),用文本文档格式打开,添加下方内容

Host *
HostkeyAlgorithms +ssh-rsa
PubkeyAcceptedKeyTypes +ssh-rsa

保存后,再次clone就成功了

1. Getting Started

1.1 About Version Control

Local Version Control Systems
The method of choice is to copy files into another directory (perhaps a time-stamped directory, if they’re clever). This approach is very common because it is so simple, but it is also incredibly error prone.

Centralized Version Control Systems
These systems have a single server that contains all the versioned files, and a number of clients that check out files from that central place.

Distributed Version Control Systems
Every client have fully mirror the repository, including its full history.

1.2 A Short History of Git

A Short History of Git
As with many great things in life, Git began with a bit of creative destruction and fiery controversy.

1.3 What is Git?

Snapshots, Not Differences
These other systems store as a set of files and the changes made to each file over time. this is the Differences.

Nearly Every Operation Is Local
you have the entire history of the project right there on your local disk, most operations seem almost instantaneous.

Git Has Integrity
ou can’t lose information in transit or get file corruption without Git being able to detect it.

Git Generally Only Adds Data
in Git, nearly all of them only add data to the Git database.

The Three States
Git has three main states that your files can reside in: modified, staged, and committed:
Modified means that you have changed the file but have not committed it to your database yet.
Staged means that you have marked a modified file in its current version to go into your next commit snapshot.
Committed means that the data is safely stored in your local database.

The basic Git workflow goes something like this:
You modify files in your working tree.
You selectively stage just those changes you want to be part of your next commit, which adds only those changes to the staging area.
You do a commit, which takes the files as they are in the staging area and stores that snapshot permanently to your Git directory.

1.6 Getting Started – First-Time Git Setup

First-Time Git Setup
Git comes with a tool called git config that lets you get and set configuration variables, These variables can be stored in three different places:
[path]/etc/gitconfig file: Contains values applied to every user on the system and all their repositories.
~/.gitconfig or ~/.config/git/config file: Values specific personally to you.
config file in the Git directory (that is, .git/config): Specific to that single repository.
You can view all of your settings and where they are coming from using:

$ git config --list --show-origin