我需要像这样从git中安装一个依赖项:
npm i git://hostname.com/scm/projects/project.name.git#tag123
不幸的是,它失败了:
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
我的.git-credentials
看起来是这样的:
https://username:password@hostname.com/
.gitconfig
看起来是这样的:
[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
这里有什么问题,怎么解决?
发布于 2022-01-19 15:49:55
https://stackoverflow.com/questions/69538431
复制相似问题