registry: Fresh certificate has incorrect expiration date
While doing bower install I get following error:
#0 1.681 bower angular-elastic#2.4.2 CERT_HAS_EXPIRED Request to https://registry.bower.io/packages/angular-elastic failed: certificate has expired
ERROR: failed to solve: process "/bin/bash -o pipefail -c bower install" did not complete successfully: exit code: 1
bower.io cert looks fine, but going to https://registry.bower.io/packages/angular-elastic it shows that cert is issued today, but it expires yesterday
About this issue
- Original URL
- State: open
- Created a year ago
- Reactions: 18
- Comments: 40 (2 by maintainers)
any idea when this can be sorted out, CI/CD is having the cert issue with installing the bower, looking for some solution without disabling SSL
Also seeing this in our CI/CD pipelines.
As I mentioned here, a temporary solution that solved the issue for us was to use the heroku-mirror rather than the regular registry.
Rather than turning off SSL we’ve set the
registryparameter in the.bowerrclike this.Not sure how permanent of a solution it is as I’ve seen it mentioned that certs for node versions <10 are discontinued now, but at least it worked for us and it sure beats turning off SSL.
Same here, the SSL certificate needs to be properly created and installed for https://registry.bower.io/packages/ to get this resolved:
This seems to be true, but it is fixable:
and it went just fine.
So for me the entire fix was:
I too facing the same issue.
(node:16801)[DEP0022] DeprecationWarning: os.tmpDir() is deprecated. Use os.tmpdir() instead. Warning: Request to https://registry.bower.io/packages/angular-resource failed: certificate has expired Use --force to continue.`Im experiencing this behaviour from my Jenkins CI/CD for Docker image creation. Is there any temp solution? such as alterative registry? I don’t want to disable SSL.
Ran into the same problem, we are using node 8, can’t upgrade to new version either at least for another year.
I used this silly workaround, switch to node 12 for bower install, then change back to node 8 for gulp build:
Other solutions you might try for now are:
bower install{ "strict-ssl": false }In the meantime I’ll work on another solution that should fix this issue by embedding registry within Bower itself.
From what we have noticed, this issue seems to be happening in the servers/machines that was already performing bower commands, which has some SSL certificate caching present during the SSL handshake process. For new machines (where bower command is ran for the first time), the issue seems not present
As a temporary work around, we commented out bower command from the CI/CD process(since we do not have new packages being added at the moment) and retained a copy of the
bower_componentsfolder in the server (this is not recommended approach, but had to do this to solve a deployment blocker).Need to find a permanant fix next day!
bower installworks for newer versions of node.Only
bower installcommand I execute on the newer node (for example 12), and the rest of the commands for building the project I execute on the version I need.It worked for us.
but I don’t recommend this solution, disabling SSL can be dangerous, I did this just to check if the problem is with SSL
It’s true that the certificate is issued today, but its expiration date is July 23.
It seems to me that something wrong with the new certificate because we have the same problem:
Having the same issue. Tried some step as below:
Worked for me!!!
As @mchrapek mentioned here:- https://github.com/bower/bower/issues/2608#issuecomment-1519835378, adding
"strict-ssl": falseto .bowerrc file made it workedEdit: This is not a recommended approach, but for testing only.