I had the same issue. Resolved by following steps below:
1. Opened Google Chrome signed out of Github
2. In VS2022 upper right corner account button, I clicked on Add another account and signed in to Github when it opened Github.com in the browser
3. I signed in and it redirected to VS2022
4. Problem solved