英文:
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?")
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论