我正在尝试从 bitbucket 安装 Go 模块,如下所示:
go get bitbucket.org/kardianos/osext
但是我收到以下错误:
package bitbucket.org/kardianos/osext: Get https://api.bitbucket.org/1.0/repositories/kardianos/osext: x509: certificate signed by unknown authority
Google 将我引导至 this post 处的说明,我随后编辑了 /etc/mercurial/hgrc
以包含:
[web]
cacerts = /etc/ssl/certs/ca-certificates.crt
按照我的操作系统 (Debian) 的指示,但是我仍然收到相同的错误。
我还能做什么?
最佳答案
it looks like I'm still using 1.0.2 (the version provided with Debian wheezy)
考虑到这看起来像 Go 1.0 bug ,首先要检查的是将 Go 升级到 1.3+。
net/http: use tls host instead of proxy, when checking against a certificate
这可以解决证书问题。
Golang Debian packages提到 1.3.2(但对于 Debian Jessie,不是喘不过气来的)
更多内容可以关注“How to install Golang 1.1(+) in Debian from repository ”。
(在“How can I run Debian stable but install some packages from testing?”之后完成)
关于未知证书颁发机构的 Go 包安装失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26844958/