Add a GitHub account from the Account settings dialog:
Open the Account Settings dialog by going to File > Account Settings....
From the All Accounts submenu, select + Add to add an account, and select GitHub.
You'll be redirected to the browser, where you can sign in with your GitHub credentials. After you sign in, you'll get a success window in the browser, and you can return to Visual Studio.
Your GitHub account will now be present in the All Accounts submenu.
Open the Account Settings dialog by going to File > Account Settings....
From the All Accounts submenu, select + Add to add an account, and then select GitHub.
You'll be redirected to the browser, where you can sign in with your GitHub credentials. After you sign in, you'll get a success window in the browser, and you can return to Visual Studio.
Your GitHub account will now be present in the All Accounts submenu.
Add a GitHub account from the profile card:
If you're not already signed in to Visual Studio, select the Sign in link in the upper-right corner of the Visual Studio environment and use a Microsoft account, work account, or school account to sign in.
Then, follow these instructions to add your GitHub account.
Select the icon with your profile name in the upper-right corner of the Visual Studio environment, select Add another account, and then select GitHub.
You'll be redirected to the browser, where you can sign in with your GitHub credentials. After you sign in, you'll get a success window in the browser, and you can return to Visual Studio.
Your GitHub account will now be present in your profile card.
Enabling GitHub enterprise accounts
By default, Visual Studio only has public GitHub accounts enabled. Use the following steps to add a GitHub Enterprise Server account or an account associated with .ghe.com endpoints.
To enable GitHub enterprise accounts, go to Tools > Options and search for the Accounts options.
Then, check the box to Include GitHub Enterprise Server accounts. The next time you go to your Account Settings and try to add a GitHub account, you'll see options for both GitHub and GitHub Enterprise.
After you enter your GitHub Enterprise server address, select Sign in with your browser. There, you can sign in using your GitHub Enterprise credentials.
To enable GitHub enterprise accounts, go to Tools > Options > Accounts.
Then, check the box to Include GitHub Enterprise accounts. The next time you go to your Account Settings and try to add a GitHub account, you'll see options for both GitHub and GitHub Enterprise.
After you enter your GitHub Enterprise URL, select Sign in with your browser. There, you can sign in using your GitHub Enterprise credentials.
Select the icon with your initials in the upper-right corner of the Visual Studio environment. Then, select Add another account > GitHub.
You'll be redirected to the browser, where you can sign in with your GitHub EMU credentials.
You can use the Account Settings dialog to manage your accounts:
Select the icon with your initials in the upper-right corner of the Visual Studio environment. Open the Account Settings dialog by selecting Account settings or by going to File > Account Settings....
From the All Accounts submenu, select + Add dropdown to add an account, and then select GitHub.
Select GitHub Enterprise on the Connect to GitHub dialog.
Select the icon with your initials in the upper-right corner of the Visual Studio environment. Open the Account Settings dialog by selecting Account settings or by going to File > Account Settings....
From the All Accounts submenu, select + Add dropdown to add an account, and then select GitHub.
Select GitHub Enterprise on the Connect to GitHub dialog.
Note
Ensure you enter your GitHub EMU account credentials (the username has an underscore followed by the company name) on this page.
After you sign in, you'll get a success window in the browser, and you can return to Visual Studio.
Remove an account
To remove an account, select Remove for the account you want to remove from the All Accounts submenu in the Account Settings dialog.
Select File > Account Settings....
All Accounts lists all accounts signed into Visual Studio. Select Remove for the account you want to remove.
Confirm the removal on the dialog that appears.
Remove an account
To remove an account:
Select the icon with your profile name in the upper-right corner of your Visual Studio environment.
Select Remove account for the account you want to remove.
You can also use the Account Settings dialog to remove an account.
Select File > Account Settings....
All Accounts lists all accounts signed into Visual Studio. Select Remove for the account you want to remove.
Confirm the removal on the dialog that appears.
Troubleshooting sign in issues
If you're experiencing issues when adding or re-authenticating GitHub accounts, try the following steps:
HTTP Strict Transport Security (HSTS) issues
Verify that HTTP Strict Transport Security (HSTS) is not enabled for localhost on your system's default web browser:
On Microsoft Edge, you can type: edge://net-internals/#hsts and enter localhost under the Delete domain security policies section.
On Google Chrome, type: chrome://net-internals/#hsts and enter localhost under the Delete domain security policies section.
Run-as issues
Running Visual Studio using an account that doesn't match your signed-in Windows account, may cause issues when adding GitHub accounts to Visual Studio. You may encounter this issue when using 3rd party products that attempt to run Visual Studio elevated.
You can verify the user by following these steps:
Open the Task Manager
Navigate to the Details tab
Search for the devenv.exe process
Ensure the username for that process matches the signed in Windows Account
To fix this, run Visual Studio as the user you're signed into Windows with, and then add your GitHub account.
Note
Please report a problem if you're still experiencing sign in issues.
This certification measures your ability to accomplish the following technical tasks: Design and implement processes and communications, design and implement a source control strategy, design and implement build and release pipelines, develop a security and compliance plan, and implement an instrumentation strategy.
Learn how to install GitHub Copilot to get GitHub Copilot Completions and Chat in Visual Studio. Use the Copilot badge in the IDE to access options to manage or troubleshoot your Copilot state.
Use GitHub Copilot completions in Visual Studio to use AI assistance to generate information about your code, including suggested edits and new code snippets.
Learn about the fully integrated GitHub Copilot Chat in Visual Studio. Use the chat interface to ask coding-related questions from right within the IDE.
Learn about the AI-assisted development tools in Visual Studio, such as GitHub Copilot Completions and Chat, and IntelliCode, and how they can help you write code more efficiently.