未知证书颁发机构的 Go 包安装失败

标签 go mercurial debian

我正在尝试从 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/

相关文章:

go - 有什么方法可以使用 golang std 库来格式化日志(如下所述)?

SublimeText 中的 Gofmt 插件未找到 GOPATH 错误

java - 在 vert.x 顶点中包含 jars

linux - 如何在 Debian 中将简单的 Go 服务器作为守护进程运行?

php - http.newRequest 不发送发布数据

docker - 使用 lint 命令构建 docker go 应用程序

mercurial - 了解 Mercurial 分支

mercurial - Mercurial : replacing directory contents in one change

ssh - 从通过另一台服务器连接的服务器克隆存储库

debian - 创建两个具有交叉文件的 debian 包