Unable to download Go packages from GitHub

1.9k Views Asked by At

I'm getting below error while downloading.

go get github.com/go-sql-driver/mysql: module github.com/go-sql-driver/mysql: Get "https://proxy.golang.org/github.com/go-sql-driver/mysql/@v/list": x509: certificate signed by unknown authority

Go version - 1.13/1.15(tried both) OS - Ubuntu 18 Tried update ca-certificates as well

Can anyone help me out?

1

There are 1 best solutions below

7
On

Check first the context in which this error pops up:

  • go version
  • execution environment (shell).

For instance, this error pops up during Docker build instance, where the Dockerfile uses an image without certificates installed, as in golang/go issue 35702.
Said Dockerfile would need:

RUN apk update && apk add --no-cache git ca-certificates && update-ca-certificates