Go包安装失败,原因是未知的证书颁发机构。

huangapple go评论82阅读模式
英文:

Go package installation failing for unknown certificate authority

问题

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

谷歌引导我查看了这篇帖子上的说明,我已经按照说明编辑了/etc/mercurial/hgrc文件,添加了以下内容:

[web]
cacerts = /etc/ssl/certs/ca-certificates.crt

针对我的操作系统(Debian)进行了设置,但是我仍然收到相同的错误信息。

我还能做些什么?

英文:

I'm attempting to install a Go module from bitbucket as follows:

go get bitbucket.org/kardianos/osext

But I receive the following error:

> package bitbucket.org/kardianos/osext: Get https://api.bitbucket.org/1.0/repositories/kardianos/osext: x509: certificate signed by unknown authority

Google lead me to the instructions at this post, which I have followed by editing /etc/mercurial/hgrc to contain:

[web]
cacerts = /etc/ssl/certs/ca-certificates.crt

as instructed for my OS (Debian), however I still receive the same error.

what else can I do?

答案1

得分: 2

看起来我仍在使用1.0.2版本(Debian wheezy提供的版本)。

考虑到这看起来像是一个Go 1.0的错误,首先要检查的是将Go升级到1.3+版本。

在检查证书时,可以使用tls主机而不是代理来解决证书问题。

Golang Debian软件包提到了1.3.2版本(但是适用于Debian Jessie,而不是wheezy)。

你可以参考"[如何在Debian中从存储库安装Golang 1.1(+)] 3"了解更多信息。

(在"我如何在Debian稳定版上运行,但安装一些来自测试版的软件包?"之后完成)

英文:

> it looks like I'm still using 1.0.2 (the version provided with Debian wheezy)

Considering that this looks like a Go 1.0 bug, the first thing to check is to upgrade Go to 1.3+.

> net/http: use tls host instead of proxy, when checking against a certificate

That could solve the certificate issue.
Golang Debian packages mentions 1.3.2 (but for Debian Jessie, not wheezy)

You can follow "How to install Golang 1.1(+) in Debian from repository " for more.
(Done after "How can I run Debian stable but install some packages from testing?")

huangapple
  • 本文由 发表于 2014年11月10日 21:28:10
  • 转载请务必保留本文链接:https://go.coder-hub.com/26844958.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定