Loading

"Error: unable to get local issuer certificate" when working with anypoint-cli-v4 through a proxy

Udgivelsesdato: Mar 22, 2024
Beskrivelse

You are working with anypoint-cli-v4 through a proxy and getting the error below:
Error: unable to get local issuer certificate

Løsning
This is caused by missing/wrong configuration of "ANYPOINT_CERTIFICATE" environment variable.
 
To solve that problem:
  1. In a browser, log in to your anypoint platform account.
  2. Once logged in, you will need to download the SSL certificate. In Chrome it would be:
    1. Click on the icon next to the URL > Connection is secure > Certificate is valid.
    2. Click on Details tab.
    3. On the Certificate Hierarchy field, click on the root element.
    4. Click on Export button > Save the file in a place where you won't delete it later on.
  3. Set environment variable "ANYPOINT_CERTIFICATE" and point it to the path where the certificate was downloaded.
    1. Linux/Mac/Unix: $ export ANYPOINT_CERTIFICATE=[pathToCertificateFile]
    2. Windos CMD: > set ANYPOINT_CERTIFICATE=[pathToCertificateFile]
    3. Windows Powershell: $env:ANYPOINT_CERTIFICATE=[pathToCertificateFile]
  4. Then run the command again
Yderligere ressourcer

If you see the error "Error: Request failed with status code 400" instead, you will probably need to configure the variable for your proxy.

Vidensartikelnummer

001303354

 
Indlæser
Salesforce Help | Article