Repository navigation
Change GITHUB_PAT_ prefix to more generic GIT_PAT_ - #72
Closed
melissavanbussel wants to merge 1 commit into
Closed
melissavanbussel wants to merge 1 commit into
melissavanbussel wants to merge 1 commit into
Conversation
…n for non-GitHub users Fixes r-lib#56
SokolovAnatoliy
added a commit
to SokolovAnatoliy/gitcreds
that referenced
this pull request
Sep 17, 2026
GITHUB_PAT_GITLAB_COM, for a GitLab host, is misleading enough to be a support burden. r-lib#72 proposed this rename first and is the origin of the change; this commit differs only in the prefix it picks and in resting on the compatibility layer added in the previous commit. GIT_PAT_ was the prefix suggested in r-lib#56, but GIT_* is git's own namespace (GIT_DIR, GIT_ASKPASS, GIT_TERMINAL_PROMPT). Nothing collides today, and GITCREDS_PAT_ belongs to the package that owns it. The old names are still read. A warning fires once per session when one of them supplied the credential, never when the new name is set, and not at all for the bare GITHUB_PAT and GITHUB_TOKEN names, which this change does not affect. Once per session rather than per call because gitcreds_get() runs deep inside install paths in gh, pkgdepends and usethis. GITCREDS_LEGACY_WARN=false silences it. Warn-once is a flag in the local() environment and base warning(), because test-standalone.R requires every function here to be base only. The FAIL sentinel now belongs to GITCREDS_PAT_*, so a sentinel written under the old name by an older vendored copy of this file no longer suppresses a lookup. The existing cache tests are updated accordingly; they documented the previous contract. Co-authored-by: melissavanbussel <[email protected]> Closes r-lib#56
Member
|
Thanks! This is a breaking change, and ideally we'd need to keep gitcreds compatible with existing workflows. So I am going to close this in favor of #77. |
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
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.
Change GITHUB_PAT_ prefix to more generic GIT_PAT_ to remove confusion for non-GitHub users
Fixes #56