-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use auth for GitLab private repos, and fix GitLab failover behavior #157
Use auth for GitLab private repos, and fix GitLab failover behavior #157
Conversation
drzraf
commented
Oct 6, 2022
- When retrieving a ZIP from a private repository, use authentication, if provided
- Fix the GitLab failover behavior (used to bail-out on private GitLab repositories without trying to use a token if one was provided)
64999f6
to
4e53a5d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@drzraf Should we support GITHUB_TOKEN
too? Also, can you fix the PHP issues?
An even better way would be to rely upon Note that composer just provided a download-only flag (and public method) in composer/composer#11041 which would allow fetching packages (using authentication) and still install them the way we want. NB: |
The PHPCS warning is unrelated to this patch and the suggested indentation change seems wrong. But committed a "fix" anyway. |
@drzraf Cool. Just to clarify, |
I considered GITLAB_TOKEN (necessary for private GitLab repo) in the initial implementation. But it was buggy. GITLAB_TOKEN was either:
|
ping ? |
@drzraf Is there a good way to test this? |
|
@drzraf Sorry for the delay! Here's what I tried:
Is there something obvious I'm missing? My private repo is https://gitlab.com/danielbachhuber/wp-cli-test-package |
…, if provided - Fix the GitLab failover behavior (used to bail-out on private GitLab repositories without trying to use a token if one was provided)
59e7186
to
e71b3e3
Compare
… precision about Git hosting
I just added a couple of commits fix two aspects:
|
@drzraf Cool, sounds good. Can you fix up the PHPCS issues and then we can land it? |