I continue to get this error when trying to run a ...
# general
b
I continue to get this error when trying to run a build on Github:
Copy code
tderr:
There was 1 error downloading required artifacts:
1. zero-api-python 1 from git+<https://github.com/zeals-co-ltd/zero-api.git@v0.1.631>
    pid 1487 -> /home/runner/.cache/pants/named_caches/pex_root/venvs/1/d881a8f5dff01abf8f60d8ca212d5cf43381f85e/302b21f4c5ac9f243cbb9cb5d57e98957a60ea02/bin/python
I cut out a bunch of code, but the basic problem is we have a repo, that is installing from a private github repo. We want to pass the credentials in. Every other repo in our codebase has a standardized way of doing it that basically looks like:
Copy code
- name: Configure git for private modules
        run: |
          git config --global url."https://${{ secrets.ORG_PROJECTS_TOKEN }}@github.com/".insteadOf "<https://github.com/>"
Fairly standard. I think I'm failing to pass this into PantsBuild. Any ideas on what I'm missing? No other repos use PantsBuild and so no one else at the company knows anything about this.
I found this old error, that may be very similar to what I'm dealing with: https://github.com/pantsbuild/pants/issues/20027 Do you know if this was every fixed? We're using HTTPS rather than ssh, but I think this is the same core problem of credentials not being able to be passed to the sandboxed pantsd runner
I think I figured out a way to fix this. It at least works for now, I added this to my pants.toml
Copy code
[subprocess-environment]
env_vars.add = [
    "HOME",
]
So the git values can be passed in. If this is the expected way to do it, great, if not I'd like to do this as by-the-book as possible. Sorry for asking questions really rapidly like this. Because I'm in Japan time, the hours are super bad for American questions, so I just sort of post because I know they'll get answered once I've gone to bed.
h
No worries re questions, fire away!
And I'm glad you've found a solution.
So setting
$HOME
allows the subprocess to find the git config there?
b
It appears to pass in the environmental variables to the sandboxed pantsd stuff. I think.
It did fix it.