Go-github: x509: certificate signed by unknown authority

Created on 10 Nov 2018  路  3Comments  路  Source: google/go-github

Hi,

I'm not sure if this has something to do with https://github.com/golang/go/issues/24652 but I'm running this SDK in a simple

FROM alpine

WORKDIR /app
COPY --from=builder /http /http

ENTRYPOINT /http

container and it seems to be triggering a Get https://api.github.com/repos/OGKevin/x/pulls/x: x509: a certificate signed by unknown authority error, when the code executes

pullRequest, _,err:= handler.client.PullRequests.Get(...)

I did some research and could not find anything concrete. Most results, without even mentioning docker, are about docker registry. The only thing that came close was the above-referenced issue but I'm missing some knowledge to conclude if that's indeed related.

Maybe you guys have an idea why this is happening? Because this is a bubbled up error, the stack trace does not show the actual reason, but I think that could be recovered by tracing if needed.

Most helpful comment

@renskiy I've added the following to my dockerfile

RUN apk update \
        && apk upgrade \
        && apk add --no-cache \
        ca-certificates \
        && update-ca-certificates 2>/dev/null || true

To update the ca-certificates

All 3 comments

Ah, solved. needed to add steps to properly update ca-certificates

@OGKevin how did you solve it?

@renskiy I've added the following to my dockerfile

RUN apk update \
        && apk upgrade \
        && apk add --no-cache \
        ca-certificates \
        && update-ca-certificates 2>/dev/null || true

To update the ca-certificates

Was this page helpful?
0 / 5 - 0 ratings

Related issues

gmlewis picture gmlewis  路  3Comments

smola picture smola  路  3Comments

adrienzieba picture adrienzieba  路  3Comments

xcoulon picture xcoulon  路  3Comments

zulhfreelancer picture zulhfreelancer  路  3Comments