fatal: unable to access ‘https://gopkg.in/yaml.v2/’: server certificate verification failed. CAfile: none CRLfile: none

ある時、

go get -v github.com/rubenv/sql-migrate/...

を実施したら出るようになった。

go get -v github.com/rubenv/sql-migrate/...
github.com/rubenv/sql-migrate (download)
get "gopkg.in/gorp.v1": found meta tag get.metaImport{Prefix:"gopkg.in/gorp.v1", VCS:"git", RepoRoot:"https://gopkg.in/gorp.v1"} at //gopkg.in/gorp.v1?go-get=1

(中略)

get "gopkg.in/yaml.v2": found meta tag get.metaImport{Prefix:"gopkg.in/yaml.v2", VCS:"git", RepoRoot:"https://gopkg.in/yaml.v2"} at //gopkg.in/yaml.v2?go-get=1
gopkg.in/yaml.v2 (download)
# cd .; git clone -- https://gopkg.in/yaml.v2 /go/src/gopkg.in/yaml.v2
Cloning into '/go/src/gopkg.in/yaml.v2'...
fatal: unable to access 'https://gopkg.in/yaml.v2/': server certificate verification failed. CAfile: none CRLfile: none
package github.com/rubenv/sql-migrate/sql-migrate
	imports gopkg.in/yaml.v2: exit status 128

対処

証明書によるエラーが発生している。

apt-get --allow-releaseinfo-change update && apt upgrade -y