How to switch copilot account in vscode #157518
Replies: 3 comments
-
Step-by-step Instructions
1.1 - In VS Code’s Activity Bar (left side), click the Accounts icon (your avatar) at the bottom-left. Alternative via Command Palette: Press Ctrl+Shift+P (Windows/Linux) or ⌘+Shift+P (Mac).
2.1 - Close VS Code.
A - Via the Copilot extension’s Account Preferences | B. Via the Command Palette |
4.1 - Hover over the Copilot icon in the Status Bar; it should show your new GitHub username. |
Beta Was this translation helpful? Give feedback.
-
Hey Erfaan,
Thank you!!
It worked!!
Regards,
Himoshra
…On Sat, 26 Apr 2025, 6:12 am Erfan Sahranavard, ***@***.***> wrote:
Step-by-step Instructions
1. Sign out of your old GitHub account:
1.1 - In VS Code’s Activity Bar (left side), click the Accounts icon (your
avatar) at the bottom-left.
1.2 - In the menu, choose Sign Out for the GitHub account currently linked
to Copilot.
Alternative via Command Palette:
Press Ctrl+Shift+P (Windows/Linux) or ⌘+Shift+P (Mac).
Type and run GitHub: Sign Out to disconnect any GitHub identity.
2. (If needed) Clear cached credentials:
Note: If signing out does not prompt you to re-authenticate, VS Code
may still hold your old account in its global state.
2.1 - Close VS Code.
2.2 - Open the file %APPDATA%\Code\User\globalStorage\globalState.json
(Windows) or ~/Library/Application
Support/Code/User/globalStorage/globalState.json (Mac/Linux).
2.3 - Remove any lines mentioning your old GitHub username.
2.4 - Save and restart VS Code—you should now be prompted to sign in.
3. Sign in with your new GitHub account:
Note: You have two equivalent methods:
A - Via the Copilot extension’s Account Preferences |
A.1 - Open the Extensions view (Ctrl+Shift+X).
A.2 - Search for GitHub Copilot, click the gear icon next to it, and
select Account Preferences.
A.3 - In the Quick Pick, choose Use a new account… and follow the
browser-based OAuth flow while logged into your Pro-subscribed GitHub
account.
A.4 - Repeat for GitHub Copilot Chat if you use the Chat extension.
B. Via the Command Palette |
B.1 - Press Ctrl+Shift+P (Windows/Linux) or ⌘+Shift+P (Mac).
B.2 - Run GitHub Copilot: Sign in (or GitHub Copilot Chat: Sign in).
B.3 - Complete the OAuth flow in your browser, ensuring you select the
GitHub account with the active Copilot subscription
4. Verify the new account is active:
4.1 - Hover over the Copilot icon in the Status Bar; it should show your
new GitHub username.
4.2 - In the Accounts menu, the active account listed under “GitHub
Copilot” should be the new one.
4.3 - Try a Copilot completion or chat—if it works, your subscription is
detected.
—
Reply to this email directly, view it on GitHub
<#157518 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AUGF4ROI6SC4FK7HFE4HLVL23LI6RAVCNFSM6AAAAAB3YGTAKCVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTEOJVGIZDIMQ>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
🕒 Discussion Activity Reminder 🕒 This Discussion has been labeled as dormant by an automated system for having no activity in the last 60 days. Please consider one the following actions: 1️⃣ Close as Out of Date: If the topic is no longer relevant, close the Discussion as 2️⃣ Provide More Information: Share additional details or context — or let the community know if you've found a solution on your own. 3️⃣ Mark a Reply as Answer: If your question has been answered by a reply, mark the most helpful reply as the solution. Note: This dormant notification will only apply to Discussions with the Thank you for helping bring this Discussion to a resolution! 💬 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Select Topic Area
Question
Body
I have github copilot on my vs code
but we have locally hosted gitlab in out company
I used to use a different github account during my free trial. now I have purchased the pro version on a different account. But I am not able to switch to the new account.
Beta Was this translation helpful? Give feedback.
All reactions