# go.dev/issue/78805: 'go get' was following plain-HTTP URLs even without GOINSECURE. env GOPROXY=direct env GONOSUMDB=vcs-test.golang.org # By default it should get rejected due to an insecure schema. ! go get vcs-test.golang.org/go/insecure/insecure2 stderr 'unrecognized import path "vcs-test.golang.org/go/insecure/insecure2": go-import meta tag specifies repository URL "http://vcs-test.golang.org/insecure" with insecure scheme, but module path "vcs-test.golang.org/go/insecure/insecure2" is not matched by the GOINSECURE environment variable; see ''go help environment''' ! stderr 'Not Found' ! stderr '@v/list' # Setting a mismatching GOINSECURE shouldn't make a difference. env GOINSECURE=vcs-test.golang.org/*/*/insecure2not ! go get vcs-test.golang.org/go/insecure/insecure2 stderr 'unrecognized import path "vcs-test.golang.org/go/insecure/insecure2": go-import meta tag specifies repository URL "http://vcs-test.golang.org/insecure" with insecure scheme, but module path "vcs-test.golang.org/go/insecure/insecure2" is not matched by the GOINSECURE environment variable; see ''go help environment''' ! stderr 'Not Found' ! stderr '@v/list' # Setting a matching GOINSECURE should make it try and fetch the module. # (Though its source doesn't exist, so just confirm it fails in the expected way.) env GOINSECURE=vcs-test.golang.org/*/*/insecure2 ! go get vcs-test.golang.org/go/insecure/insecure2 ! stderr GOINSECURE stderr 'Not Found' stderr '@v/list' -- go.mod -- module test go 1.25.0