twilio cli的安装完成,没有任何错误。然而,在尝试登录cli时,我遇到了这个错误。
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:
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:createStep3 :运行命令-
twilio profiles:create
» Secure credential storage failed to load.我在bashrc文件中使用export设置了twilio凭据,以确保每次启动时都会加载它们。
请帮帮忙。如果设置了环境变量,为什么twilio需要配置文件和登录?我如何才能成功地部署应用程序,而不会面临必须创建配置文件的问题?
重现问题的步骤:
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 发布于 2021-03-15 07:18:45
通过执行下面的步骤,您应该能够绕过twilio login。
Want to use environment variables instead of creating a profile?
https://stackoverflow.com/questions/66624834
复制相似问题