-2

I'm trying to run go get -u -v in my application repository, but I'm receiving an error:

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

The self-hosted Git repository runs with http, not https. How to force it to use http and forget about https?

Megidd
  • 7,089
  • 6
  • 65
  • 142

1 Answers1

3

Using $ go help get it is mentioned:

$ go help get

...

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

...

Therefore $ go get -u -v -insecure resolved the error.

Megidd
  • 7,089
  • 6
  • 65
  • 142