Topic: Certificate Error During Jenkins Build
steve.wright@essvote.com pro premium priority asked 3 years ago
Expected behavior - Properly build the Angular application
Actual behavior - Error message below received.
Resources (screenshots, code snippets etc.)
From the Jenkins console log:
npm ERR! Error while executing:
npm ERR! C:\Program Files\Git\cmd\git.EXE ls-remote -h -t https://oauth2:xxxx@git.mdbootstrap.com/mdb/angular/mdb5/prd/mdb5-angular-ui-kit-pro-essential
npm ERR! fatal: unable to access 'https://oauth2:xxxxx@git.mdbootstrap.com/mdb/angular/mdb5/prd/mdb5-angular-ui-kit-pro-essential/': SSL certificate problem: certificate has expired
NOTE: I have verified that the ISRG Root X1 certificate on my build machine has been updated to expire in 2035.
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Resolved
- User: Pro
- Premium support: Yes
- Technology: MDB Angular
- MDB Version: MDB5 1.3.0
- Device: VM
- Browser: Chrome
- OS: Windows 2012 R2
- Provided sample code: No
- Provided link: Yes
Marek Winiarski staff pro premium commented 3 years ago
Hi,
You are probably using docker images and running applications through Node. In this situation, you can update Node to the latest version, or if you can't do it, these commands should help:
add this to Jenkins job before repo clone
sh 'mv /usr/share/ca-certificates/mozilla/DST_Root_CA_X3.crt / tmp /' sh 'update-ca-certificates --fresh' sh 'git config --global http.sslCAInfo /usr/share/ca-certificates/mozilla/ISRG_Root_X1.crt'
This is a suggested solution, I am not sure what configuration you are using, if it doesn't work, write me what tools you use and give their versions, e.g. Jenkins 2.317 and Node, Git. This information is sensitive, so please email me at m.winiarski@mdbootstrap.com
steve.wright@essvote.com pro premium priority commented 3 years ago
We have just discovered that we were using a very old version of GIT. Updating it to the most recent release on our build server resolved the problem.
Thanks for your help