Hi everyone, thank you for reading this,
First, please excuse my English.
My problem is about the GOINSECURE environment variable.
I am working for my corporation behind a firewall and so on…
My goal is to download and import (go get…) a lib.
So the proxy that I am using at my work is working with http (i know…). No https available.
So I had to configured the GOPROXY env. variable to use the right proxy.
And configured GOINSECURE env. variable to not check over the fact that the proxy is in fact using http protocol.
Here are my (anonymoused) env vars :
PS C:\Users\xx\Documents\go_policyExtractor> go env
set GO111MODULE=
set GOARCH=amd64
set GOBIN=
set GOCACHE=C:\Users\xx\AppData\Local\go-build
set GOENV=C:\Users\xx\AppData\Roaming\go\env
set GOEXE=.exe
set GOEXPERIMENT=
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOINSECURE=*.PROXY,PROXY,*.github.com,github.com #uncertainty; PROXY = corpo server hostname
set GOMODCACHE=C:\Users\xx\go\pkg\mod
set GONOPROXY=
set GONOSUMDB=
set GOOS=windows
set GOPATH=C:\Users\xx\go
set GOPRIVATE=
set GOPROXY=http://xx:XX@PROXY:8080 #xx = username; XX = password; PROXY = corpo server hostname
set GOROOT=C:\Users\xx\Documents\go
set GOSUMDB=sum.golang.org
set GOTMPDIR=
set GOTOOLDIR=C:\Users\xx\Documents\go\pkg\tool\windows_amd64
set GOVCS=
set GOVERSION=go1.17.2
set GCCGO=gccgo
set AR=ar
set CC=gcc
set CXX=g++
set CGO_ENABLED=1
set GOMOD=C:\Users\xx\Documents\go_policyExtractor\go.mod
set CGO_CFLAGS=-g -O2
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-g -O2
set CGO_FFLAGS=-g -O2
set CGO_LDFLAGS=-g -O2
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-m64 -mthreads -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=C:\Users\xx\AppData\Local\Temp\go-build3899924670=/tmp/go-build -gno-record-gcc-switches
As you can see, proxy and insecure configured…
But here is the result of any go get
PS C:\Users\xx\Documents\go_policyExtractor> go get github.com/xuri/excelize
go: github.com/mohae/deepcopy@v0.0.0-20170929034955-c48cc78d4826: refusing to pass credentials to insecure URL: http://xx:xxxxx@PROXY:8080/github.com/mohae/deepcopy/@v/v0.0.0-20170929034955-c48cc78d4826.mod
I already rode this issue : cmd/go: support sending credentials to an insecure GOPROXY · Issue #35975 · golang/go · GitHub
And tried the local CA fix but…
PS C:\Users\xx\local_ca> mkcert -install
ERROR: add cert: failed adding cert: Access Refused.
I’m done testing everything…
Do anyone has an idea about the way i should use GOINSECURE (is it even the right var?)
Just to remember : my goal is to download code from github using go get through my corpo http (no https) proxy.
Thanks for reading this; hope that my explanation was enough.