Serverless Framework Login From Behind a Proxy?

时光总嘲笑我的痴心妄想 提交于 2020-01-15 11:18:53

问题


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.


回答1:


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

$env:cafile = "C:\path\to\certs.pem"


来源:https://stackoverflow.com/questions/57758234/serverless-framework-login-from-behind-a-proxy

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!