server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none

ubuntu
NPM Install errs as follows:
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-08 T03_03_55_220Z – debug. Log

the reason is that the private certificate is used. After checking the data, the security authentication of the system is shut down.
git config –global http.sslverify “false”
or
export GIT_SSL_NO_VERIFY=1
Reference: https://blog.csdn.net/xunan003/article/details/82190419

Read More: