devbox
devbox copied to clipboard
[plugins] Support private GitHub repositories
Summary
Fixes #1918
Plugins stored in a private GitHub repository fail to pull due to due to a lack of authentication. This PR will add an Authorization: token <GITHUB_TOKEN> header to the request if the GITHUB_TOKEN environment variable is set.
How was it tested?
Added test cases for http.Request with and without environment variable.
Manually tested on my machine:
- Added a private GitHub repo to devbox.json
"include" devbox shell: confirmed existing 404 errorGITHUB_TOKEN=xxx devbox shell: shell environment boots correctly