Skip to content

Commit f22575f

Browse files
dsymeCopilot
andauthored
📚 Add Gemini auth docs and improve Copilot PAT setup (#17957)
* add docs * tweak add message * Update pkg/cli/engine_secrets.go Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 0cf1c55 commit f22575f

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

‎pkg/cli/engine_secrets.go‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ func getSecretRequirementsForEngine(engine string, includeSystemSecrets bool, in
9292
func getEngineSecretDescription(opt *constants.EngineOption) string {
9393
switch opt.Value {
9494
case string(constants.CopilotEngine):
95-
return "Fine-grained PAT with Copilot Requests permission and repo access where Copilot workflows run."
95+
return "Fine-grained PAT with Copilot Requests permission."
9696
case string(constants.ClaudeEngine):
9797
return "API key from Anthropic Console for Claude API access."
9898
case string(constants.CodexEngine):
@@ -237,8 +237,7 @@ func promptForSecret(req SecretRequirement, config EngineSecretConfig) error {
237237
// promptForCopilotPATUnified prompts the user for a Copilot PAT with detailed instructions
238238
func promptForCopilotPATUnified(req SecretRequirement, config EngineSecretConfig) error {
239239
fmt.Fprintln(os.Stderr, "")
240-
fmt.Fprintln(os.Stderr, "GitHub Copilot requires a fine-grained Personal Access Token (PAT) with Copilot permissions.")
241-
fmt.Fprintln(os.Stderr, console.FormatWarningMessage("Classic PATs (ghp_...) are not supported. You must use a fine-grained PAT (github_pat_...)."))
240+
fmt.Fprintln(os.Stderr, "GitHub Copilot requires a fine-grained Personal Access Token (PAT) with 'Copilot requests' permissions.")
242241
fmt.Fprintln(os.Stderr, "")
243242
fmt.Fprintln(os.Stderr, "Please create a token at:")
244243
fmt.Fprintln(os.Stderr, console.FormatCommandMessage(" "+req.KeyURL))
@@ -247,9 +246,10 @@ func promptForCopilotPATUnified(req SecretRequirement, config EngineSecretConfig
247246
fmt.Fprintln(os.Stderr, " • Token name: Agentic Workflows Copilot")
248247
fmt.Fprintln(os.Stderr, " • Expiration: 90 days (recommended for testing)")
249248
fmt.Fprintln(os.Stderr, " • Resource owner: Your personal account")
250-
fmt.Fprintln(os.Stderr, " • Repository access: \"Public repositories\" (you must use this setting even for private repos)")
251-
fmt.Fprintln(os.Stderr, " • Account permissions → Copilot Requests: Read-only")
249+
fmt.Fprintln(os.Stderr, " • Repository access: \"Public repositories\" (you must use this setting for Copilot Requests permission to appear)")
250+
fmt.Fprintln(os.Stderr, " • Add permissions → Copilot Requests: Read-only")
252251
fmt.Fprintln(os.Stderr, "")
252+
fmt.Fprintln(os.Stderr, "If you run into trouble see https://github.github.com/gh-aw/reference/auth/#copilot_github_token.")
253253

254254
var token string
255255
form := huh.NewForm(

0 commit comments

Comments
 (0)