Skip to content
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

Support authentication with GitHub in installer script for increased rate-limits #901

Open
dan1elhughes opened this issue Jan 1, 2024 · 1 comment
Labels
✨ feature-request New feature or request

Comments

@dan1elhughes
Copy link

When running the installer, I get this error:

root@DreamMachine:~/.ssh# sh -c 'DEBUG=1 sh -c "$(curl -sL https://nextdns.io/install)"'
ERROR: Cannot get latest version:
INFO: OS: debian
INFO: GOARCH: arm64
INFO: GOOS: linux
INFO: NEXTDNS_BIN: /usr/bin/nextdns
INFO: INSTALL_RELEASE:
ERROR: Cannot detect running environment.

Which I can pin down to this line in the installer by running the command manually:

curl https://api.github.com/repos/nextdns/nextdns/releases/latest
{"message":"API rate limit exceeded for <ip address> (But here's the good news: Authenticated requests get a higher rate limit. Check out the documentation for more details.)","documentation_url":"https://docs.github.com/rest/overview/resources-in-the-rest-api#rate-limiting"}

If the installer supported some environment variable $GITHUB_API_TOKEN and passed this as the header to cURL (--header "Authorization: Bearer $GITHUB_API_TOKEN"), I'd be able to install when the GitHub API is rate-limiting me.

@dan1elhughes dan1elhughes added the ✨ feature-request New feature or request label Jan 1, 2024
@dan1elhughes
Copy link
Author

As an aside, I can also bypass this by specifying the latest version by hand instead of having the script read it from GitHub with

NEXTDNS_VERSION="v1.41.0" sh -c 'sh -c "$(curl -sL https://nextdns.io/install)"'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ feature-request New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant