首页 > 解决方案 > 即使我设置了环境变量,Twilio CLI 也不会登录

问题描述

在终端的 Mac OS 上,当我输入 twilio login 时,我得到:

 » Installing keytar ...
 » Secure credential storage failed to load.

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

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

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

Once these environment variables are set, a twilio-cli profile is not required to move forward with installation.

但是,我确实尝试通过键入下面的语句来设置环境变量,但它仍然不起作用(当然我用实际值替换了字符串):

export TWILIO_ACCOUNT_SID="abcd"
export TWILIO_AUTH_TOKEN="efgh"

标签: twilio

解决方案


推荐阅读