Issue
At the place where I work we use git as our source control. The repository is set up privately. To connect to it I was provided only with a username and a password. SSH is used as a protocol. I was told that I can easily use SmartGit (paid GUI for git) to connect to the repo. I don't want to spend my money on this software and I want to work from the terminal. When I try to clone the repo (some parts censored),
git clone ssh://<username>@<server.com>/~<server_user>/repo/<project>
I don't even have a chance to enter my password, because I get an error:
Unable to negotiate with xxx.xxx.xxx.xxx port xxxx: no matching host key type found. Their offer: ssh-rsa,ssh-dss
The problem is that using the aforementioned GUI, I can easily choose Authentication Type
and set it to Password
and use it to clone the repo for the first time. I've tried to find the info on the internet, but only found guides on how to setup up keys on the server, which is not what I want.
I need to be able to connect to the git repo using ssh and login/password authentication without public/private keys.
Solution
To fix this issue you need to specify these options in the [HOME_DIR]/.ssh/config
file:
Host *
HostkeyAlgorithms +ssh-rsa
PubkeyAcceptedKeyTypes +ssh-rsa
After that is done, when connecting to git-shell it should prompt you with a password.
Answered By - bub1ick Answer Checked By - Dawn Plyler (WPSolving Volunteer)