无服务器框架从代理后面登录? [英] Serverless Framework Login From Behind a Proxy?

查看:54
本文介绍了无服务器框架从代理后面登录?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试从代理后面使用 无服务器框架.

在配置 npm 以使用我的证书文件后,我能够安装框架:

npm config set cafile C:\path\to\certs.pemnpm install serverless --global

但是,当我尝试登录无服务器时,出现以下错误:

无服务器登录

<块引用><块引用>

获取错误--------------------------------------------

FetchError:请求https://api.serverless.com/core/tokens失败,原因:无法获得本地颁发者证书在客户端请求.(D:\...\npm\node_modules\serverless\node_modules\node-fech\index.js:133:11)

如何设置证书文件才能登录到无服务器?

预先感谢您的考虑和回复.

解决方案

cafile 环境变量必须在调用 login 之前设置.在 Windows PowerShell 上:

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

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.

解决方案

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

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

这篇关于无服务器框架从代理后面登录?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆