【问题标题】:Go package installation failing for unknown certificate authority未知证书颁发机构的 Go 软件包安装失败
【发布时间】:2014-11-10 13:28:10
【问题描述】:

我正在尝试从 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) 的指示,但我仍然收到相同的错误。

我还能做什么?

【问题讨论】:

  • 你使用的是什么版本的 Go?之前已修复此问题:code.google.com/p/go/source/detail?r=c70d7dfc
  • @VonC: 很好......看起来我还在使用 1.0.2(Debian wheezy 提供的版本)。我会尝试升级,看看是否能解决问题。

标签: go mercurial debian


【解决方案1】:

看来我还在用 1.0.2(Debian wheezy 提供的版本)

考虑到这看起来像Go 1.0 bug,首先要检查的是升级到 1.3+。

net/http:在检查证书时使用 tls 主机而不是代理

这可以解决证书问题。
Golang Debian packages 提到 1.3.2(但对于 Debian Jessie,不是 wheezy)

您可以关注“How to install Golang 1.1(+) in Debian from repository ”了解更多信息。
(在“How can I run Debian stable but install some packages from testing?”之后完成)

【讨论】:

    猜你喜欢
    • 2016-01-01
    • 2017-07-19
    • 1970-01-01
    • 2014-12-26
    • 2018-06-19
    • 1970-01-01
    • 2015-11-11
    • 2012-04-18
    相关资源
    最近更新 更多