-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error: unable to get local issuer certificate #53
Comments
The |
The browser on the machine can access https://dist.nuget.org without issue. So the certificate is fine. The runner machine is behind a corporate proxy. The issue seems to be related with Node's inability to use the certificate from macOS Keychain, nodejs/node#39657. Any thoughts? I tried the NODE_EXTRA_CA_CERTS variable workaround but had no success. |
Here's a shot in the dark. Can you try adding this intermediate certificate into Node's extra certs bundle?
|
Thanks for your replies. After I exported the certificate to PEM format (instead of the CER format which was the default when done previously), the 'Setup Nuget.exe' action succeeded with the NODE_EXTRA_CA_CERTS workaround. |
Glad it worked. Here's what I think the problem/solution was. To build a certificate chain, you start from the end certificate and build to a root certificate. Usually, for publicly trusted certificates, there is one or more intermediate certificates in the middle. You already have the end certificate and, hopefully, the root certificate is already installed locally as a trusted root. Getting all intermediate certificates is a remaining task. Many certificate chain building engines take advantage of an Authority Information Access (AIA) attribute in the certificate that provides a download URL for the issuing CA's certificate. Following the AIA attributes or "AIA chasing" is how you make intermediate certificates available locally for chain building. Node.js doesn't do AIA chasing. So, you have to manually download intermediate certificates and put them in a file for Node.js to use. I grabbed the intermediate certificate for the SSL certificate for https://dist.nuget.org/ and posted it in PEM format. This should be documented. |
@jwang242, just to be super clear, which certificate did you export and specify using the |
It's the corporate's Cisco Umbrella Root certificate which has already been installed locally. |
Where do you find this certificate ? I am facing the same error message as in your original post. My runner is on a coporate desktop machine, i have cisco anyconnect secure mobility client installed but am not sure how to fix this error message |
Setup-nuget action failed on self-hosted MacOS runner.
Error: unable to get local issuer certificate
I have exported our company certificate from keychain and added the NODE_EXTRA_CA_CERTS environment variable (value is the path of the certificate file) to the runner .env file. Restarted the runner but got the same error.
I also modified the "setup nuget" step in the workflow file with the environment variable but it made no difference.
name: Setup NuGet.exe
uses: NuGet/setup-nuget@v1.0.7
env:
NODE_EXTRA_CA_CERTS: TheCertificatePath
Please help.
The text was updated successfully, but these errors were encountered: