我有一个带有package.json文件的nodejs项目(在ubuntu上)。 package.json文件中的某些依赖项指向 git-repositories (带有自签名证书的gitlab)。
如果我打电话
npm install
npm应该解析并安装所有依赖项。不幸的是,我有以下错误消息:
npm ERR! git clone https://git.repository.domain.com/myname/grunt-grunticon-hover.git Cloning into bare repository '/home/dev/.npm/_git-remotes/https-git-repository-domain-com-myname-grunt-grunticon-hover-git-15073ad9'...
npm ERR! git clone https://git.repository.domain.com/myname/grunt-grunticon-hover.git
npm ERR! git clone https://git.repository.domain.com/myname/grunt-grunticon-hover.git error: server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none while accessing https://git.repository.domain.com/myname/grunt-grunticon-hover.git/info/refs?service=git-upload-pack
npm ERR! git clone https://git.repository.domain.com/myname/grunt-grunticon-hover.git fatal: HTTP request failed
npm ERR! Error: Command failed: error: server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none while accessing https://git.repository.domain.com/myname/grunt-grunticon-hover.git/info/refs?service=git-upload-pack
如果我用“git clone ...”克隆存储库,我没有问题。
我必须安装证书吗?我该如何安装证书?我在哪里可以找到证书?
我正在使用ubuntu。
答案 0 :(得分:0)
在package.json中使用git + ssh:
"dependencies": {
"myname": "git+ssh://git.repository.domain.com/myname/grunt-grunticon-hover.git"
}