From 08c659bdf834599d82df3de8f45663f07095cced Mon Sep 17 00:00:00 2001 From: William Martin Date: Mon, 4 Dec 2023 12:41:11 +0100 Subject: [PATCH] Document that git protocol during login is host level --- pkg/cmd/auth/login/login.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkg/cmd/auth/login/login.go b/pkg/cmd/auth/login/login.go index ac377c4cc..9018a9d0b 100644 --- a/pkg/cmd/auth/login/login.go +++ b/pkg/cmd/auth/login/login.go @@ -71,6 +71,10 @@ func NewCmdLogin(f *cmdutil.Factory, runF func(*LoginOptions) error) *cobra.Comm %[1]sgh help environment%[1]s for more info. To use gh in GitHub Actions, add %[1]sGH_TOKEN: ${{ github.token }}%[1]s to %[1]senv%[1]s. + + The git protocol to use for git operations on this host can be set with %[1]s--git-protocol%[1]s, + or during the interactive prompting. Although login is for a single account on a host, setting + the git protocol will take affect for all users on the host. `, "`"), Example: heredoc.Doc(` # Start interactive setup @@ -126,7 +130,7 @@ func NewCmdLogin(f *cmdutil.Factory, runF func(*LoginOptions) error) *cobra.Comm cmd.Flags().StringSliceVarP(&opts.Scopes, "scopes", "s", nil, "Additional authentication scopes to request") cmd.Flags().BoolVar(&tokenStdin, "with-token", false, "Read token from standard input") cmd.Flags().BoolVarP(&opts.Web, "web", "w", false, "Open a browser to authenticate") - cmdutil.StringEnumFlag(cmd, &opts.GitProtocol, "git-protocol", "p", "", []string{"ssh", "https"}, "The protocol to use for git operations") + cmdutil.StringEnumFlag(cmd, &opts.GitProtocol, "git-protocol", "p", "", []string{"ssh", "https"}, "The protocol to use for git operations on this host") // secure storage became the default on 2023/4/04; this flag is left as a no-op for backwards compatibility var secureStorage bool