1

I need to install a dependency from git like this:

npm i git://hostname.com/scm/projects/project.name.git#tag123

unfortunatly it fails with:

npm ERR! Error while executing:
npm ERR! C:\Program Files\Git\mingw64\bin\git.EXE ls-remote -h -t git://hostname.com/scm/projects/project.name.git
npm ERR!
npm ERR! fatal: refusing to work with credential missing host field
npm ERR!
npm ERR! exited with error code: 128

my .git-credentials looks like this:

https://username:[email protected]/

and .gitconfig looks like this:

[https]
[http "https://hostname.com"]
    sslCert = D:/git/ssl.crt
    sslKey = D:/git/ssl.key
    sslVerify = false
[url "https://hostname.com/"]
    insteadOf = git://hostname.com/

[core]
    longpaths = true
[credential]
    helper = store

What is wrong here and how to solve it?

1 Answer 1

1

Solution

Delete the git installation folder (e.g.: C:\Program Files\Git) completely and install the latest git version from https://git-scm.com/downloads.

Seems like a git interanl config get corrupt.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.