首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >创建配置文件问题- Ubuntu 20.04.1上的Twilio CLI

创建配置文件问题- Ubuntu 20.04.1上的Twilio CLI
EN

Stack Overflow用户
提问于 2021-03-14 21:01:43
回答 1查看 195关注 0票数 0

twilio cli的安装完成,没有任何错误。然而,在尝试登录cli时,我遇到了这个错误。

代码语言:javascript
复制
twilio login
 » Secure credential storage failed to load.

Alternatively, twilio-cli can use credentials stored in environment variables:

# OPTION 1 (recommended)
export TWILIO_ACCOUNT_SID=your Account SID from twil.io/console
export TWILIO_API_KEY=an API Key created at twil.io/get-api-key
export TWILIO_API_SECRET=the secret for the API Key

# OPTION 2
export TWILIO_ACCOUNT_SID=your Account SID from twil.io/console
export TWILIO_AUTH_TOKEN=your Auth Token from twil.io/console

Once these environment variables are set, a twilio-cli profile is not required and you may skip the "login" step.

现在成功设置了环境变量。在运行echo $TWILIO_ACCOUNT_SID命令时,我能够看到结果。

其他详情: node -v v14.16.0

NAME="Ubuntu“VERSION="20.04.1 LTS (焦点Fossa)”

Step1 : Twilio CLI是使用全局标记安装的。

Step2:

代码语言:javascript
复制
npm run deploy:twilio-cli
Creating an optimized production build...
Compiled successfully.

File sizes after gzip:

  249.22 KB  build/static/js/2.adfce53b.chunk.js
  25.59 KB   build/static/js/main.312818aa.chunk.js
  745 B      build/static/js/runtime-main.ff852d00.js
The project was built assuming it is hosted at /rooms/.
https://cra.link/deployment
 » Could not find profile.
 » To create the profile, run:

  twilio profiles:create

Step3 :运行命令-

代码语言:javascript
复制
twilio profiles:create
 » Secure credential storage failed to load.

我在bashrc文件中使用export设置了twilio凭据,以确保每次启动时都会加载它们。

请帮帮忙。如果设置了环境变量,为什么twilio需要配置文件和登录?我如何才能成功地部署应用程序,而不会面临必须创建配置文件的问题?

重现问题的步骤:

代码语言:javascript
复制
sudo apt install npm
npm install -g twilio-cli
sudo apt-get install libsecret-1-dev
npm install -g @oclif/plugin-commands
npm install -g oclif
twilio plugins:install @twilio-labs/plugin-rtc
npm ci (install from package-lock.json)
npm run deploy:twilio-cli -g 
EN

回答 1

Stack Overflow用户

发布于 2021-03-15 07:18:45

通过执行下面的步骤,您应该能够绕过twilio login

Want to use environment variables instead of creating a profile?

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/66624834

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档