devbox icon indicating copy to clipboard operation
devbox copied to clipboard

[plugins] Support private GitHub repositories

Open jylamont opened this issue 1 year ago • 0 comments

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 error
  • GITHUB_TOKEN=xxx devbox shell: shell environment boots correctly

jylamont avatar Mar 22 '24 18:03 jylamont