TL; DR: don't omit username@ in your remote urls when on Windows.
On Linux and on Windows with ssh by default, you can omit the username from remote URLs, like this:
git clone server-name:/srv/git/repo-name
Because the standard behavior of ssh is to use any username you are currently logged into. If you are running Windows and have configured git to use plink.exe so that you can use the key loaded in your pageant , this will not work because plink does not have the same automatic username behavior, which leads to such a cryptic message error, because that he will request a username:
$ plink server-name login as: _
Against:
$ plink username@server-name ...logs you in...
If you have already cloned the repository in any way, you can fix the remotes in your .git/config by adding username@ to the remote URL.
jlh Jun 28 '19 at 8:25 2019-06-28 08:25
source share