git - Unable to negotiate with 158.219.232.171 port 22: no matching host key type found.

$ git clone [email protected]:path/projectname.git
Cloning into 'projectname'...
Unable to negotiate with 158.219.232.171 port 22: no matching host key type found. Their offer: ssh-rsa fatal: Could not read from remote repository.

Please make sure you have the correct access rights and the repository exists.

Allow ssh-rsa temporarily
You can explicitly allow ssh-rsa for this host in your SSH config.

Edit (or create) your SSH config file:

vim ~/.ssh/config

Host code.kf.xxx.net
  HostName 158.219.232.171
  User username
  HostkeyAlgorithms +ssh-rsa
  PubkeyAcceptedKeyTypes +ssh-rsa

Then try cloning again:

git clone [email protected]:path/projectname.git

你可能感兴趣的:(git,ssh)