Repository navigation
Text missing in the description of GH_TOKEN #11294
Copy link
Copy link
Closed
Labels
bugSomething isn't workingSomething isn't workinggh-helprelating to the gh help commandrelating to the gh help commandneeds-triageneeds to be reviewedneeds to be reviewed
Description
Activity
Huh, I guess the
<>result in the text being rendered out here:cli/pkg/cmd/root/help_topic.go
Lines 45 to 47 in 6049cce
%[1]sGH_TOKEN%[1]s, %[1]sGITHUB_TOKEN%[1]s (in order of precedence): an authentication token that will be used when a command targets either <github.com> or a subdomain of <ghe.com>. Setting this avoids being prompted to authenticate and takes precedence over previously stored credentials. We should probably check the others here as well: #10429
Thanks a lot for reporting!
- addedgh-helprelating to the gh help commandrelating to the gh help command
on Jul 14, 2025 I think the problem is
<hostname.domain>has no protocol, thus the transformation to GitHub Pages doesn't link them the same as sayGLAMOUR_STYLEenvironment variable:-
GH_TOKEN<p><code class="language-plaintext highlighter-rouge">GH_TOKEN</code>, <code class="language-plaintext highlighter-rouge">GITHUB_TOKEN</code> (in order of precedence): an authentication token that will be used when -- a command targets either <github.com> or a subdomain of <ghe.com>. Setting this avoids being prompted to authenticate and takes precedence over previously stored credentials.</ghe.com></github.com></p>
-
GLAMOUR_STYLE<p><code class="language-plaintext highlighter-rouge">GLAMOUR_STYLE</code>: the style to use for rendering Markdown. See -- <a href="https://github.com/charmbracelet/glamour#styles">https://github.com/charmbracelet/glamour#styles</a></p>
Additional instances
Unsure if this was just a problem with
<github.com>and<ghe.com>, I did a bit of digging to look for anything like<hostname.domain>but wasn't able to find anything else:./pkg/cmd/extension/command.go:303: The URL format is useful when the repository is not hosted on <github.com>. ./pkg/cmd/auth/login/login.go:98: # Authenticate against <github.com> by reading the token from a file ./pkg/cmd/search/code/code.go:43: The results might not match what is seen on <github.com>, and new features like regex search ./pkg/cmd/root/help_topic.go:46: a command targets either <github.com> or a subdomain of <ghe.com>. Setting this avoids being prompted to ./pkg/cmd/api/api.go:204: <github.com> API requests. ./pkg/cmd/api/api.go:209: GH_HOST: make the request to a GitHub host other than <github.com>. ./pkg/cmd/repo/rename/rename.go:62: you must follow additional steps on <github.com>.
So here are all the
<github.com>and<ghe.com>references:$ grep -rn "<\(github\|ghe\).com>" --exclude-dir site --exclude-dir .git . ./acceptance/testdata/repo/repo-rename-transfer-ownership.txtar:6:stderr 'New repository name cannot contain \''/\'' character - to transfer a repository to a new owner, you must follow additional steps on <github.com>. For more information on transferring repository ownership, see <https://docs.github.com/en/repositories/creating-and-managing-repositories/transferring-a-repository>.' ./pkg/cmd/extension/command.go:303: The URL format is useful when the repository is not hosted on <github.com>. ./pkg/cmd/auth/login/login.go:98: # Authenticate against <github.com> by reading the token from a file ./pkg/cmd/search/code/code.go:43: The results might not match what is seen on <github.com>, and new features like regex search ./pkg/cmd/root/help_topic.go:46: a command targets either <github.com> or a subdomain of <ghe.com>. Setting this avoids being prompted to ./pkg/cmd/api/api.go:204: <github.com> API requests. ./pkg/cmd/api/api.go:209: GH_HOST: make the request to a GitHub host other than <github.com>. ./pkg/cmd/repo/rename/rename.go:62: you must follow additional steps on <github.com>. ./pkg/cmd/repo/rename/rename.go:129: return fmt.Errorf("New repository name cannot contain '/' character - to transfer a repository to a new owner, you must follow additional steps on <github.com>. For more information on transferring repository ownership, see <https://docs.github.com/en/repositories/creating-and-managing-repositories/transferring-a-repository>.") ./pkg/cmd/repo/rename/rename_test.go:230: errMsg: "New repository name cannot contain '/' character - to transfer a repository to a new owner, you must follow additional steps on <github.com>. For more information on transferring repository ownership, see <https://docs.github.com/en/repositories/creating-and-managing-repositories/transferring-a-repository>.",
-
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinggh-helprelating to the gh help commandrelating to the gh help commandneeds-triageneeds to be reviewedneeds to be reviewed
Describe the bug
In the online version of the documentation, the domain names are missing from the description of the
GH_TOKENenvironment variable.Affected version
N/A - this is for the online version.
Steps to reproduce the behavior
Expected vs actual behavior
It should say "an authentication token that will be used when a command targets either <github.com> or a subdomain of <ghe.com>."
Logs
N/A