Visual Studio using wrong userid to push to github #136565
Replies: 8 comments 14 replies
-
Try clearing cached credentials in the Windows Credential Manager, removing any GitHub-related entries. Sign out of GitHub in Visual Studio and sign back in with the correct credentials. Ensure Visual Studio is using the correct Git installation and that no old remotes are configured. If you're using a Personal Access Token (PAT), make sure it's associated with the correct GitHub account. These steps should resolve the issue. |
Beta Was this translation helpful? Give feedback.
-
you can try this below command lines: |
Beta Was this translation helpful? Give feedback.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
-
Beta Was this translation helpful? Give feedback.
-
Hello from VS team, would you mind filing a bug via "Report a Problem"? |
Beta Was this translation helpful? Give feedback.
-
🕒 Discussion Activity Reminder 🕒 This Discussion has been labeled as dormant by an automated system for having no activity in the last 60 days. Please consider one the following actions: 1️⃣ Close as Out of Date: If the topic is no longer relevant, close the Discussion as 2️⃣ Provide More Information: Share additional details or context — or let the community know if you've found a solution on your own. 3️⃣ Mark a Reply as Answer: If your question has been answered by a reply, mark the most helpful reply as the solution. Note: This dormant notification will only apply to Discussions with the Thank you for helping bring this Discussion to a resolution! 💬 |
Beta Was this translation helpful? Give feedback.
-
Strangely, I just got ALL of the posts to this thread just now. I don't know why github didn't send me all the messages, I'll be reviewing them and seeing if they help. If not, I'll file a bug as requested in the next-to-last post |
Beta Was this translation helpful? Give feedback.
-
Select Topic Area
Question
Body
I use Visual Studio to write C# code. For the past several months, the git integration has not been working correctly, when connecting to github, it uses the wrong userid; an old one I'm not using anymore.
The user which should be used is linuxgurugamer, instead, it's trying to use jbayer3000
Versions
Visual Studio 2022: 17.9.2
Git 4 Windows: 2.46.0.windows.1
The error I am getting is this:
However, doing a "git push" from either a cmd cli or the Developer Powershell terminal works
At a cmd cli and the Developer Powershell terminal, the git config shows the following:
Looking at the git config inside the Git->Settings, the user name and email for both the global settings and the Git Repository Settings->General are also correct.
As a workaround, I've installed the extensions: "Git Extensions", which also works, but I'd prefer to just use the embedded git integration in VS
I've also searched my envirnment variables, they also are correct
Any ideas?
Thanks in advance
Beta Was this translation helpful? Give feedback.
All reactions