🔴 [SOLVED] GitHub Copilot Login Problem in VS Code – Failed to sign in to GHE.com #179008
Unanswered
AliRadoan
asked this question in
GitHub Education
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Hi everyone❤️,
VS Code - GitHub Copilot Error "Failed to sign in to GHE.com. You must be signed in to use AI features."⚠️
Error Description 📝
When attempting to sign in to GitHub Copilot inside Visual Studio Code, the following message appears:
Even though the account being used is a GitHub Pro / Education account, the connection fails and Copilot stops working.
Root Cause of the Problem 🧠
This issue occurs when VS Code settings are incorrectly configured to use GitHub Enterprise Server (GHE) instead of regular GitHub.com.
In the
settings.jsonfile, the following lines appear:These settings cause VS Code to attempt to sign in to a non-existent domain (ghe.com) instead of the official domain (github.com), which leads to authentication failure and the error message.
Steps to Reproduce the Problem 🔁
Failed to sign in to GHE.com. You must be signed in to use AI features.Confirmed Solution ✅
Step 1: Open Settings File 📂
Open Command Palette using:
Ctrl + Shift + PStep 2: Search for Settings 🔍
Search for the command:
Preferences: Open User Settings (JSON)Step 3: Remove Enterprise Settings 🗑️
Delete any settings related to GitHub Enterprise, such as:
Step 4: Keep Simple Configuration 📝
Make the file simple with only this configuration:
{ "github.copilot.nextEditSuggestions.enabled": true }Step 5: Save Changes 💾
Save the changes:
Step 6: Reload VS Code 🔄
Reload VS Code using Command Palette:
Developer: Reload WindowStep 7: Sign in Again 🔐
GitHub Copilot: Sign InStep 8: Verify Copilot is Working ✨
Test Copilot by:
Additional Tips 💡
Success! 🎉
After following these steps, GitHub Copilot should work normally in VS Code without any authentication errors!
All reactions