ubuntu系统
npm install 时报错如下:
npm ERR! Error while executing:
npm ERR! /usr/bin/git ls-remote -h -t https://test.com/scm/saf/test.git
npm ERR!
npm ERR! fatal: unable to access 'https://test.com/scm/saf/test.git/': server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none
npm ERR!
npm ERR! exited with error code: 128
npm ERR! A complete log of this run can be found in:
npm ERR! /home/test/.npm/_logs/2020-05-08T03_03_55_220Z-debug.log
原因是使用了私用证书,查资料后,关闭系统的安全认证解决:
git config --global http.sslverify "false"
或
export GIT_SSL_NO_VERIFY=1