Environment
Go version 1.18.
Git version 2.32.0.
Github ssh credentials configured.
Supposed to work but not works.
env GIT_TERMINAL_PROMPT=1 go get github.com/xyz/abc
git config --global --add url."git@github.com:".insteadOf "https://github.com/"
Solution.
export GOPRIVATE=github.com/{privateName}/*
go get github.com/{privateName}/*