acheong08 / ChatGPT-to-API

Scalable unofficial ChatGPT API for production.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error occurred during startup, unable to update access token.

dengchangdong opened this issue · comments

he specific error message is as follows:

Location: begin
Status code: 0
Details:
Embedded error: Get "https://chat.openai.com/api/auth/csrf": x509: certificate signed by unknown authority

Could you please advise on how to resolve this? Thank you!

commented

same here

已通过Golang 发送 Https 请求报错 x509 certificate signed by unknown authority (在 Docker 中运行)这篇文章解决这个问题。
过程如下:
1、下载https://raw.githubusercontent.com/bagder/ca-bundle/master/ca-bundle.crt,重命名为ca-certificates.crt并复制到ChatGPT-to-API根目录。
2、修改Dockerfile,在COPY --from=builder /app/ChatGPT-To-API /app/ChatGPT-To-API前面增加COPY ./ca-certificates.crt /etc/ssl/certs/
3、重构容器。