-
Notifications
You must be signed in to change notification settings - Fork 264
Use GitHub token for CLI version checks (avoid anonymous rate‑limit) #3050
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
EyalDelarea
approved these changes
Aug 7, 2025
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.
LGTM.
See my comments which are open for discussion.
a34bb5e
to
b4fcdcc
Compare
b4fcdcc
to
f56714b
Compare
f56714b
to
79853ca
Compare
79853ca
to
2feaf64
Compare
EyalDelarea
approved these changes
Aug 10, 2025
2feaf64
to
a29fe7f
Compare
EyalDelarea
approved these changes
Aug 10, 2025
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.
LGTM :)
Just see the interval change comment
a29fe7f
to
30908a7
Compare
EyalDelarea
approved these changes
Aug 10, 2025
30908a7
to
553f510
Compare
553f510
to
8b1ab2e
Compare
cyrilc-pro
approved these changes
Aug 11, 2025
8b1ab2e
to
3e6f3a2
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
dev
branch.go vet ./...
.go fmt ./...
.Why
When JFrog CLI checks for the latest version, it calls the GitHub Releases API.
Without a token, these requests are anonymous and can quickly hit GitHub’s low rate limit, especially in CI.
This surfaced in the setup action as workflows intermittently failing due to HTTP 403 from the GitHub API (rate limit).
What’s changing
Tokenized version check
utils.CheckNewCliVersionAvailable(currentVersion)
now readsJFROG_CLI_GITHUB_TOKEN
from the environment and uses it as a Bearer token for the GitHub API request.New env var
JFROG_CLI_GITHUB_TOKEN
, documented indocs/common/env.go
and surfaced in global env var help.API & flags cleanup
--github-token
global flag and its plumbing frommain.go
.Relates to :
jfrog/setup-jfrog-cli#223