我正在尝试从bitbucket安装Go模块,如下所示:
go get bitbucket.org/kardianos/osext
但是我收到以下错误:
package bitbucket.org/kardianos/osext:获取https://api.bitbucket.org/1.0/repositories/kardianos/osext:x509:由未知权限签署的证书
Google引导我查看this post处的说明,我之后编辑/etc/mercurial/hgrc
以包含:
[web]
cacerts = /etc/ssl/certs/ca-certificates.crt
按照我的操作系统(Debian)的指示,但是我仍然收到同样的错误。
我还能做什么?
答案 0 :(得分:2)
看起来我还在使用1.0.2(Debian wheezy提供的版本)
考虑到这看起来像Go 1.0 bug,首先要检查的是升级到1.3 +。
net / http:在检查证书时使用tls主机而不是代理
这可以解决证书问题 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?”之后完成)