包:无法下载,http://*.com/*/*.git 正在使用不安全的网络协议

时间:2024-03-04

浏览:458

作者:佚名

偷偷努力,悄无声息地变强,然后惊艳所有人!哈哈,小伙伴们又来学习啦~今天我将给大家介绍《包:无法下载,http://*.com/*/*.git 正在使用不安全的网络协议》,这篇文章主要会讲到等等知识点,不知道大家对其都有多少了解,下面我们就一起来看一吧!当然,非常希望大家能多多评论,给出合理的建议,我们一起学习,一起进步!

问题内容

我尝试在我的应用程序存储库中运行 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 解决了错误。

今天带大家了解了的相关知识,希望对你有所帮助;关于Golang的技术知识我们会一点点深入介绍,欢迎大家关注golang学习网公众号,一起学习编程~

本文内容来源于互联网,如有侵权请联系删除。

相关文章

更多

热门专题

更多
首页