为hyperledger编译Go程序时使用http不安全协议

为hyperledger编译Go程序时使用http不安全协议,go,compiler-errors,Go,Compiler Errors,我正在使用 go version go1.9.1 windows/amd64 当我尝试使用以下方法编译时: go get -u --tags nopkcs11 github.com/hyperledger/fabric/core/chaincode/shim 我明白了 package github.com/hyperledger/fabric/core/chaincode/shim: cannot download, http://gerrit.hyperledger.org/r/fabr

我正在使用

go version go1.9.1 windows/amd64
当我尝试使用以下方法编译时:

go get -u --tags nopkcs11 
github.com/hyperledger/fabric/core/chaincode/shim
我明白了

package github.com/hyperledger/fabric/core/chaincode/shim: cannot download,
http://gerrit.hyperledger.org/r/fabric uses insecure protocol
我无法更改为
https://github.com/hyperledger/...
和https是不允许的

如果你去把所有的东西放在一起,你可以看到我正在使用的源代码

这是它的开始

package main

import (
    "fmt"

    "github.com/hyperledger/fabric/core/chaincode/shim"
    "github.com/hyperledger/fabric/protos/peer"
)

// SimpleAsset implements a simple chaincode to manage an asset
type Appointment struct {
}

// Init is called during chaincode instantiation to initialize any
// data. Note that chaincode upgrade also calls this function to reset
// or to migrate data.
func (t *SimpleAsset) Init(stub shim.ChaincodeStubInterface) peer.Response {

如何成功编译我的程序?

在该repo中没有从gerrit导入的内容。你确定你所有的资料都是最新的吗?您的
go get-u
命令在包名称前有一个换行符;因此,如果这确实是您正在运行的命令,那么您并不是在更新源代码。顺便说一句,如果您查看
get
命令的帮助输出,有一个
-unsecure
选项允许这样做,但看起来它首先应该可以正常工作。@JimB-我添加了换行符以使其更具可读性。我讨厌我必须向右滚动才能看到那行。明白了。不过,运行
go-get-github.com/hyperledger/fabric/core/chaincode/shim
对我来说很有用,所以您的代码中一定有不同的东西。您的git配置中是否可能有一个
而不是
正在更改URL?我需要查看我的Go设置。我找不到protos/peer或shim,因此我的设置有问题。非常感谢你。顺便说一句,不安全的工作。