'git fatal: refusing to work with credential missing host field

While cloning git repository, I am getting error fatal: refusing to work with credential missing host field

Earlier i was getting ssl handshake error so, after adding below in git configuration file, now i am stuck with mentioned fatal error.

    sslCert = ~/xyz.crt
    sslKey = ~/xyz.key
    sslVerify = false
    sslCertPasswordProtected = false

also i tried adding by adding below but no success:

[url "https://hostname"]
    insteadOf = git://hostname

git credential approve

protocol=https
host=www.abc.com
username=yuyiuyiuy
password=78yhkjh



warning: ----------------- SECURITY WARNING ----------------
warning: | TLS certificate verification has been disabled! |
warning: ---------------------------------------------------
warning: HTTPS connections may not be secure. See https://aka.ms/gcm/tlsverify for more information.
warning: failed to probe 'http(s)://www.abc.com/' to detect provider
warning: An error occurred while sending the request.
warning: see https://aka.ms/gcm/autodetect for more information.

Also, used as below


protocol=https
host=www.abc.com
username=yuyiuyiuy
password=78yhkjh
url=<git repo path>

fatal: refusing to work with credential missing host field

git


Solution 1:[1]

This helped me:

...
[http]
    sslbackend = openssl
...

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Igor Mukhin