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

Document relationship between host and active account #9032

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
14 changes: 8 additions & 6 deletions pkg/cmd/auth/status/status.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,12 +140,14 @@ func NewCmdStatus(f *cmdutil.Factory, runF func(*StatusOptions) error) *cobra.Co
cmd := &cobra.Command{
Use: "status",
Args: cobra.ExactArgs(0),
Short: "View all accounts and authentication status",
Long: heredoc.Doc(`Verifies and displays information about your authentication state.

This command will test your authentication state for each GitHub host that gh knows about and
report on any issues.
`),
Short: "Display active account and authentication state on each known GitHub host",
Long: heredoc.Docf(`
Display active account and authentication state on each known GitHub host.

For each host, the authentication state of each known account is tested and any issues are included in
the output. Each host section will indicate the active account, which will be used when targeting that host.
To change the active account for a host, see %[1]sgh auth switch%[1]s.
andyfeller marked this conversation as resolved.
Show resolved Hide resolved
`, "`"),
RunE: func(cmd *cobra.Command, args []string) error {
if runF != nil {
return runF(opts)
Expand Down
2 changes: 1 addition & 1 deletion pkg/cmd/auth/switch/switch.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ func NewCmdSwitch(f *cmdutil.Factory, runF func(*SwitchOptions) error) *cobra.Co
# Select what host and account to switch to via a prompt
$ gh auth switch

# Switch to a specific host and specific account
# Switch the active account on a specific host to a specific user
$ gh auth switch --hostname enterprise.internal --user monalisa
`),
RunE: func(c *cobra.Command, args []string) error {
Expand Down