R
Railway2mo ago
Mozzy

tls: failed to verify certificate: x509: certificate signed by unknown authority

I am learning Go by building a Discord bot and an API service. I am getting the following error when deploying commands to Discord from the built container:
tls: failed to verify certificate: x509: certificate signed by unknown authority
tls: failed to verify certificate: x509: certificate signed by unknown authority
I know very little about networking. Any pointers? Repo: https://github.com/leonlarsson/bfstats-bot-go
Solution:
This seems to do the trick
COPY --from=build /etc/ssl/certs /etc/ssl/certs
COPY --from=build /etc/ssl/certs /etc/ssl/certs
...
Jump to solution
5 Replies
Percy
Percy2mo ago
Project ID: a1f9ffe2-f62a-40c6-93ae-a31972cae7bb
Mozzy
Mozzy2mo ago
a1f9ffe2-f62a-40c6-93ae-a31972cae7bb I am using the scratch image. Maybe it is too scratch in this case?
Mozzy
Mozzy2mo ago
Sidenote: Switching from scratch to golang:1.22-bookworm (same as my dev container), I get another error
No description
Solution
Mozzy
Mozzy2mo ago
This seems to do the trick
COPY --from=build /etc/ssl/certs /etc/ssl/certs
COPY --from=build /etc/ssl/certs /etc/ssl/certs
Mozzy
Mozzy2mo ago
Considering this solved, but feel free to feedback
Want results from more Discord servers?
Add your server