go mod download
giving:
invalid version: git ls-remote -q origin in /home/user/go/pkg/mod/cache/vcs/48782783hhh8394928: exit status 128:
remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/***/***/'
GO version: 1.20
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/user/.cache/go-build"
GOENV="/home/user/.config/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/home/user/go/pkg/mod"
GONOPROXY="github.com/name/*"
GONOSUMDB="github.com/name/*"
GOOS="linux"
GOPATH="/home/user/go"
GOPRIVATE="github.com/name/*"
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GOVCS=""
GOVERSION="go1.20.5"
GCCGO="gccgo"
GOAMD64="v1"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/dev/null"
GOWORK=""
CGO_CFLAGS="-O2 -g"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-O2 -g"
CGO_FFLAGS="-O2 -g"
CGO_LDFLAGS="-O2 -g"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -Wl,--no-gc-sections -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build909459645=/tmp/go-build -gno-record-gcc-switches"
Any help?
Changed the ~/.gitconfig
file.
Before:
[url "https://GITHUB_USERNAME:GITHUB_TOKEN@github.com"]
insteadOf = https://github.com
After change:
[url "https://GITHUB_USERNAME:GITHUB_TOKEN@github.com/orgName"]
insteadOf = https://github.com/orgName