MCPcopy
hub / github.com/cli/cli / NewCmdAuth

Function NewCmdAuth

pkg/cmd/auth/auth.go:16–37  ·  view source on GitHub ↗
(f *cmdutil.Factory)

Source from the content-addressed store, hash-verified

14)
15
16func NewCmdAuth(f *cmdutil.Factory) *cobra.Command {
17 cmd := &cobra.Command{
18 Use: "auth <command>",
19 Short: "Authenticate gh and git with GitHub",
20 GroupID: "core",
21 }
22
23 cmdutil.DisableAuthCheck(cmd)
24
25 cmd.AddCommand(authLoginCmd.NewCmdLogin(f, nil))
26 cmd.AddCommand(authLogoutCmd.NewCmdLogout(f, nil))
27 cmd.AddCommand(authStatusCmd.NewCmdStatus(f, nil))
28 cmd.AddCommand(authRefreshCmd.NewCmdRefresh(f, nil))
29 cmd.AddCommand(gitCredentialCmd.NewCmdCredential(f, nil))
30 cmd.AddCommand(authSetupGitCmd.NewCmdSetupGit(f, nil))
31 cmd.AddCommand(authTokenCmd.NewCmdToken(f, nil))
32 cmd.AddCommand(authSwitchCmd.NewCmdSwitch(f, nil))
33
34 cmdutil.DisableTelemetryForSubcommands(cmd)
35
36 return cmd
37}

Callers

nothing calls this directly

Calls 2

DisableAuthCheckFunction · 0.92

Tested by

no test coverage detected