How do I use golang packages from a private repo w...
# general
c
How do I use golang packages from a private repo when building with pants
2.20.1
? I've set GOPRIVATE, It seems the package download is missing git. My pants.toml snippet
Copy code
[golang]
cgo_enabled = false
subprocess_env_vars = [
    'GOPRIVATE=<http://github.com/my-user/my-repo/\*|github.com/my-user/my-repo/\*>',
]
The error I get when running pants test or pants package
Copy code
ProcessExecutionFailure: Process 'Download Go module <http://github.com/my-user/my-repo/src/go/my-package@v0.0.10|github.com/my-user/my-repo/src/go/my-package@v0.0.10>.' failed with exit code 1.
stdout:
{
        "Path": "<http://github.com/varmour-eng/my-repo/src/go/my-package|github.com/varmour-eng/my-repo/src/go/my-package>",
        "Version": "v0.0.10",
        "Error": "<http://github.com/varmour-eng/my-repo/src/go/my-package@v0.0.10|github.com/varmour-eng/my-repo/src/go/my-package@v0.0.10>: git init --bare in /private/var/folders/jb/89lmbjx17jl3nl0v33k9gkh00000gn/T/pants-sandbox-aHtji3/gopath/pkg/mod/cache/vcs/128f219cd2a114ed3955b8281894ad067d950adfde1ec338f0ddfd574e298b30: exec: \"git\": executable file not found in $PATH"
}

stderr: