rapid-bird-79300
05/19/2022, 4:20 AMfast-nail-55400
05/19/2022, 4:24 AMrapid-bird-79300
05/19/2022, 4:25 AMfast-nail-55400
05/19/2022, 4:28 AMgo
supposed to look in $HOME/.netrc
for the password?fast-nail-55400
05/19/2022, 4:28 AMfast-nail-55400
05/19/2022, 4:29 AMHOME
is not set by default when Pants runs processes in the execution sandbox.rapid-bird-79300
05/19/2022, 4:33 AMfast-nail-55400
05/19/2022, 4:34 AM.netrc
, that impacts Go’s ability to find .netrc
or .gitconfig
. Specifically because os.UserHomeDir
looks for the HOME
environment variable. https://github.com/golang/go/blob/740b0ebb76c4cb6788eb03be683650938a7f5897/src/os/file.go#L500
And the netrc code in go
uses that call.
Haven’t looked at git
source yet, but I can imagine it is similar.
Try setting --subprocess-environment-env-vars
to include HOME
to pass it through to the execution sandbox.rapid-bird-79300
05/19/2022, 4:41 AMrapid-bird-79300
05/19/2022, 4:42 AMfast-nail-55400
05/19/2022, 5:27 AMgo mod download
to download modules and not go get
. maybe that makes a difference?rapid-bird-79300
05/19/2022, 6:13 AMrapid-bird-79300
05/19/2022, 6:18 AMfast-nail-55400
05/19/2022, 7:50 PMfast-nail-55400
05/19/2022, 7:51 PMGIT_SSH_COMMAND
in the environment would have let you override the ssh
command used by git
fast-nail-55400
05/19/2022, 7:52 PMrapid-bird-79300
05/19/2022, 7:52 PMrapid-bird-79300
05/19/2022, 7:52 PMfast-nail-55400
05/19/2022, 7:53 PMfast-nail-55400
05/19/2022, 7:53 PMrapid-bird-79300
05/19/2022, 7:54 PM