Il giorno giovedì 18 febbraio 2021 alle 16:29:42 UTC+1 Rich ha scritto:

> I've been avoiding the move to using go mod. Mainly because every time I 
> try it chokes on any of the internal repositories i have setup using ssh://
> g...@mycoderepo.com:7900 <http://g...@mycoderepo.com:7900>.  I put in to 
> my ~/.gitconfig:
>
> [url "ssh://g...@mycoderepo.com:7900 <http://g...@mycoderepo.com:7900>"]
>         insteadOf = https://mycoderepo.com/src
>
> So now if I use git, and run:
>
> git clone https://mycoderepo.com/src/companyorg/gofunctions.git
>
> It will then replace the https://mycoderepo.com/src/ with ssh://
> g...@mycoderepo.com:7900 <http://g...@mycoderepo.com:7900> and the clone 
> works. Same with pull, fetch.
>
> When I setup go modules, and then try to build a project that uses the 
> gofunctions repository: import "mycoderepo.com/src/companyorg/gofunctions"
>
> I get this:
> go: finding module for package mycoderepo.com/companyorg/gofunctions
> go: downloading mycoderepo.com/companyorg/gofunctions 
> v0.0.0-20180913124604-19aec48c9978
> format.go:10:2: 
> mycoderepo.com/companyorg/gofun...@v0.0.0-20180913124604-19aec48c9978 
> <http://mycoderepo.com/companyorg/gofunctions@v0.0.0-20180913124604-19aec48c9978>:
>  
> verifying module: 
> mycoderepo.com/companyorg/gofun...@v0.0.0-20180913124604-19aec48c9978 
> <http://mycoderepo.com/companyorg/gofunctions@v0.0.0-20180913124604-19aec48c9978>:
>  
> reading 
> https://sum.golang.org/lookup/mycoderepo.com/companyorg/gofun...@v0.0.0-20180913124604-19aec48c9978
>  
> <https://sum.golang.org/lookup/mycoderepo.com/companyorg/gofunctions@v0.0.0-20180913124604-19aec48c9978>:
>  
> 410 Gone
>         server response: not found: 
> mycoderepo.com/companyorg/gofun...@v0.0.0-20180913124604-19aec48c9978 
> <http://mycoderepo.com/companyorg/gofunctions@v0.0.0-20180913124604-19aec48c9978>:
>  
> unrecognized import path "mycoderepo.com/companyorg/gofunctions": https 
> fetch: Get "https://mycoderepo.com/companyorg/gofunctions?go-get=1": dial 
> tcp: lookup mycoderepo.com on 8.8.8.8:53: no such host
> make: *** [mac] Error 1:
>
> Which brings up many questions. 1. Why is it using https when I told git 
> to substitute that with ssh?  WHy is it going to GOOGLE'S DNS to resolve a 
> company address that is internal and not using my system's DNS setup?
>
>
By default the go tool checks the module sum database, for security reasons 
and it also uses a module proxy, for performance reasons.
You can disable both, as described 
in https://golang.org/ref/mod#private-module-privacy

Manlio

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/5e702113-945b-4005-9422-52bc19837df5n%40googlegroups.com.

Reply via email to