Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Serverless Framework Login From Behind a Proxy?

I am trying to use the serverless framework from behind a proxy.

I was able to install the framework after configuring npm to use my certs file:

npm config set cafile C:\path\to\certs.pem

npm install serverless --global

However, when I try to login to serverless I get the following error:

serverless login

Fetch Error --------------------------------------------

FetchError: request to https://api.serverless.com/core/tokens failed, reason: unable to get local issuer certificate at ClientRequest. (D:\...\npm\node_modules\serverless\node_modules\node-fetc h\index.js:133:11)

How do I set the certs file to be able to login to serverless?

Thank you in advance for your consideration and response.

like image 850
Ramón J Romero y Vigil Avatar asked Jun 14 '26 23:06

Ramón J Romero y Vigil


1 Answers

The cafile environment variable must be set before invoking login. On windows powershell:

$env:cafile = "C:\path\to\certs.pem"
like image 101
Ramón J Romero y Vigil Avatar answered Jun 17 '26 23:06

Ramón J Romero y Vigil



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!