sfreiberg / gotwilio

Twilio library for Go (golang).
BSD 2-Clause "Simplified" License
342 stars 136 forks source link

certificate signed by unknown authority #46

Closed happilymarrieddad closed 5 years ago

happilymarrieddad commented 5 years ago

Hey,

It works great locally but when I deploy to my Kubernetes cluster I get the following error. Post https://api.twilio.com/2010-04-01/Accounts/AC6ce4211566726873dad7c9924ba2ff1c/Messages.json: x509: certificate signed by unknown authority

I'm pretty sure my cert is valid. We're a decent sized company and we've been using these certs and renewing them for 4 years. This is the first time I've seen this kind of error with twilio. The only difference is we've been moving our API service from NodeJS to Go. Thanks!

Selection_238 unnamed (1)

jniedrauer commented 5 years ago

Sounds to me like your docker images don't have a default root CA bundle. Is there anything at /etc/ssl or /etc/pki/tls? For alpine linux, you need to create your own bundle or apk add --update ca-certificates for the public bundle (which will include api.twilio.com)

happilymarrieddad commented 5 years ago

@jniedrauer yep, that worked! Thanks!!

shubhamdixit863 commented 2 years ago

I had same issue with docker deployment ,in ubuntu image .I was using go ,so i just changed my Dockerfile with this

FROM ubuntu:latest

RUN apt-get update RUN apt-get install ca-certificates -y RUN update-ca-certificates

See this