文章目录
下载桌面版
登录报错1
登录失败:Login server error: Token exchange failed: token endpoint returned status 403 Forbidden: Country, region, or territory not supported
关键不是账号密码,而是 OAuth 登录在"授权码换 Token"这一步被 403 拒绝了
需要走命令窗的代理,跟代理工具代理不同
vim ~/.bashrc
然后在里面添加
export HTTP_PROXY=http://127.0.0.1:7897
export HTTPS_PROXY=http://127.0.0.1:7897
export http_proxy=http://127.0.0.1:7897
export https_proxy=http://127.0.0.1:7897
export no_proxy=localhost,127.0.0.1
用 :wq 保存退出,重启ChatGPT。
报错
登录失败:Login server error: Token exchange failed: error sending request for url (https://auth.openai.com/oauth/token)
找到启动目录
which chatgpt
直接编辑或复制给空间环境一份
cp /usr/share/applications/chatgpt.desktop ~/.local/share/applications/chatgpt.desktop
vim ~/.local/share/applications/chatgpt.desktop
找到这一行:Exec=chatgpt %U
替换成:
Exec=env HTTP_PROXY=http://127.0.0.1:7897 HTTPS_PROXY=http://127.0.0.1:7897 http_proxy=http://127.0.0.1:7897 https_proxy=http://127.0.0.1:7897 NO_PROXY=localhost,127.0.0.1,::1 no_proxy=localhost,127.0.0.1,::1 chatgpt %U
用 :wq 保存退出,重启 ChatGPT ,问题解决