If you're encountering an error while trying to sign in to Visual Studio Code with your GitHub account or Hotmail, there are a few troubleshooting steps you can take:
- Check for HSTS Issues: Ensure that HTTP Strict Transport Security (HSTS) is not enabled for
localhoston your default web browser. You can check this by using the following steps:- For Microsoft Edge, go to
edge://net-internals/#hstsand enterlocalhostunder the Delete domain security policies section. - For Google Chrome, go to
chrome://net-internals/#hstsand enterlocalhostunder the Delete domain security policies section.
- For Microsoft Edge, go to
- Run Visual Studio Code as the Correct User: Make sure you are running Visual Studio Code with the same account that you are signed into Windows with. You can verify this by checking the
Task Managerand ensuring the username for theCode.exeprocess matches your signed-in Windows account. - Re-authenticate Your Account: If you are still having issues, you may need to refresh your credentials. Look for an option to refresh your credentials in the Visual Studio Code interface.
- Remove and Re-add Your Account: If the problem persists, consider removing and then re-adding your GitHub account in Visual Studio Code. This can often resolve sign-in issues.
If these steps do not resolve the issue, you may want to check for any specific error messages that could provide more insight into the problem.