-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
add GitHub token to install_kustomize.sh #4946
add GitHub token to install_kustomize.sh #4946
Conversation
|
Welcome @vsoch! |
Hi @vsoch. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/ok-to-test Works great, thank you! Sorry for the delay. |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: KnVerey, vsoch The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Can you please rebase? I'm not able to trigger the main test run for some reason |
Signed-off-by: vsoch <vsoch@users.noreply.github.com>
@KnVerey rebased! |
/lgtm |
Thank you! |
Problem: I started to use
make
andmake install
in CI runs that used a matrix, and was seeing this issue regularly:I suspect the expected use case is manually running locally, and it would make sense to wait and try again. But for automation I definitely wanted to authenticate! So I started to look into "how to authenticate with the GitHub API" and stumbled on your script here:
kustomize/hack/install_kustomize.sh
Lines 137 to 142 in aec3500
But the request using curl doesn't give any opportunity to actually add a token, so there was no way to respond!
Solution: I thought it would be easy enough to check for GITHUB_TOKEN in the environment, and if present, to add it as a header. For my own workflows, when I modified the script and did this, that error (which was showing up more times than not) has gone away. So I think (assuming that others would want this in automation) this would be good to have! Here is an example use case from my workflow:
I'm a new contributor here so please let me know what else you need me to do. Thank you!
Signed-off-by: vsoch vsoch@users.noreply.github.com