git - 包 : cannot download, http ://*. com/*/*.git 使用不安全的协议(protocol)

标签 git go go-get

我正在尝试运行 go get -u -v在我的应用程序存储库中,但我收到一个错误:

$ go get -u -v
package */*/*: cannot download, http://*.com/*/*.git uses insecure protocol

自托管 Git 存储库使用 http 运行,而不是 https .如何强制使用http忘记https ?

最佳答案

使用 $ go help get提到:

$ go help get

...

The -insecure flag permits fetching from repositories and resolving
custom domains using insecure schemes such as HTTP. Use with caution.

...

因此$ go get -u -v -insecure解决了错误。

关于git - 包 : cannot download, http ://*. com/*/*.git 使用不安全的协议(protocol),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62227613/

相关文章:

git - 动态 git 配置 user.name - 取决于主机名

git - 还原更新索引/忽略的文件以便我可以更改分支?

git - 如何备份 StGit 工作区?

将木偶代码推送到 git 时出现 ruby​​ 错误

json - Golang 解码 JSON

go - 在 Go 中初始化空对象

go.mod 使用没有标签的模块

generics - 为什么 Go 中没有泛型?

git - 使用代理获取私有(private)仓库

去获取谷歌的云源代码库