Account A signed in everywhere, commit is assigned to account B. How to prevent this? #140769
-
Select Topic AreaQuestion Body(This is the first time I post here, so I hope I didn’t pick the wrong category.) My main GitHub account I use for work is account A. I am currently working on a repository that belongs to an organization. In my main browsers, I am now only logged to account A in one browser and not logged to GitHub in other browser. Today, I tried to commit changes using Visual Studio Code, but initially “Git repository was not found.” I solved this following microsoft/vscode-pull-request-github#3109 . I create a user token on account A and included it in in .git\config . This solved the issue, the commit was committed. But, though I was logged in to account A everywhere, using a token generated by account A, and account B not being part of the organization, the commit ended up being signed by account B. How can I make sure that account B doesn’t show up again unless I actually need it? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Solution found here: https://stackoverflow.com/questions/60977110/vs-code-uses-wrong-github-account-to-push-commits After looking for answers and trying a lot of them, The one that worked for me: 'Delete C:\Users\USER_NAME.gitconfig file |
Beta Was this translation helpful? Give feedback.
Solution found here: https://stackoverflow.com/questions/60977110/vs-code-uses-wrong-github-account-to-push-commits
After looking for answers and trying a lot of them, The one that worked for me:
'Delete C:\Users\USER_NAME.gitconfig file
Set your username: git config --global user.name "FIRST_NAME LAST_NAME"
Set your email address: git config --global user.email "MY_NAME@example.com'
by user "Arsh Shaikh" on StackOverflow.