Appearance
Gateway 认证 / Token 问题
编号格式
#NNNNN对应 GitHub issue,可直接搜索去重。
配置 auth token 后 CLI 报 token_mismatch
来源:GitHub #38617(2026-03)
现象:在 openclaw.json 中配置了 gateway.auth.token 后,CLI 执行 openclaw login 时报认证错误 token_mismatch,无法连接 Gateway。
原因:CLI 本地存储的旧 token(位于 ~/.openclaw/credentials.json)与 Gateway 配置的新 token 不匹配。CLI 使用缓存的凭证而非配置文件中的值。
解决方法:
bash
# 删除本地缓存的凭证
rm ~/.openclaw/credentials.json
# 重新登录
openclaw login提示:每次修改
gateway.auth.token后都需要执行此操作,否则 CLI 会持续使用旧 token。