8000 Add an Authorization header if GITHUB_TOKEN is set by leonboot · Pull Request #29 · phpacker/phpacker · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Add an Authorization header if GITHUB_TOKEN is set #29

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

Merged

Conversation

leonboot
Copy link
Contributor
@leonboot leonboot commented May 23, 2025

Hi!

I wanted to use PHPacker to create binaries for a CLI tool I'm making, but ran into an issue. PHPacker tries downloading from a GitHub repository, I assume to fetch the required runtimes. It does this, however, without any authentication. As I'm working on an IP that is constantly reaching the rate limits for anonymous requests, I need to authenticate my GitHub API calls. I've added basic support for this through this PR. If the GITHUB_TOKEN environment variable is set, an Authorization header is passed to the GitHub API, allowing the requester to use the higher rate limits for authenticated requests.

@gwleuverink
Copy link
Contributor

Great find! Thanks for your contribution 🙏

@gwleuverink gwleuverink merged commit e262021 into phpacker:main Jun 4, 2025
3 checks passed
@gwleuverink
Copy link
Contributor

I’ve released v0.4.0 which includes your fix 👍

@leonboot
Copy link
Contributor Author

Thanks for merging and releasing!

@gwleuverink
Copy link
Contributor

Quick follow up: The next version of PHPacker will automatically detect your .env file so you don't have to enter the token manually each time 👍🏻

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0