I'd like to remove the extra steps of having to log out, log back in, and do the 2FA each time I switch projects in VS2022. Any way around this? Seems like Windows saves one instance and that's it.
CodePudding user response:
Visual Studio 2022 does have an
Your user account/token should then be preserved in the Windows credentials manager, and would not be asked again when you switch GitHub repositories.
The OP adds:
I have two separate GH accounts with a repo in each. When I switch between those two, that's when I need to sign out/in each time
You won't have to sign out/in each time if the remote URL includes your GitHub account:
https://[email protected]/yourGHAccount1/yourProject
https://[email protected]/yourGHAccount2/yourProject
Then the Git Credential Manager would ask your token for each account and cache those.