From 465a43cf51cf46606da1badd7b5b22e9c7f4dfd1 Mon Sep 17 00:00:00 2001 From: GitMurf <64155612+GitMurf@users.noreply.github.com> Date: Wed, 4 Jun 2025 12:46:27 -0700 Subject: [PATCH] fix(copilot): gh copilot auth token conflicts w/ gh mcp env var (#2743) --- crates/goose/src/providers/githubcopilot.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/goose/src/providers/githubcopilot.rs b/crates/goose/src/providers/githubcopilot.rs index 1f29a898..63a582aa 100644 --- a/crates/goose/src/providers/githubcopilot.rs +++ b/crates/goose/src/providers/githubcopilot.rs @@ -230,7 +230,7 @@ impl GithubCopilotProvider { async fn refresh_api_info(&self) -> Result { let config = Config::global(); - let token = match config.get_secret::("GITHUB_TOKEN") { + let token = match config.get_secret::("GITHUB_COPILOT_TOKEN") { Ok(token) => token, Err(err) => match err { ConfigError::NotFound(_) => { @@ -238,7 +238,7 @@ impl GithubCopilotProvider { .get_access_token() .await .context("unable to login into github")?; - config.set_secret("GITHUB_TOKEN", Value::String(token.clone()))?; + config.set_secret("GITHUB_COPILOT_TOKEN", Value::String(token.clone()))?; token } _ => return Err(err.into()),