I'm using VS Code 1.74.0 to push changes to my GitHub repository. When I click on Sync changes
, VS Code asks me for the password for a user named 22298273@github.com
.
This "user" is unknown to me and I don't know where that number (22298273) originates from. When I press ESC
when the dialog is shown, I get the following error message in the git output:
2022-12-13 14:00:55.675 [info] > git push origin master:master [1546ms]
2022-12-13 14:00:55.676 [info] remote: Invalid username or password.
fatal: Authentication failed for 'https://github.com/some-user-name/my-first-app.git/'
This does make sense, even though I don't know the user shown above. However, when I repeatedly press Sync changes
again and always press ESC
when the dialog for entering the password comes up, the sync finally succeeds after a couple of times (without entering anything as a password):
2022-12-13 14:00:58.138 [info] > git push origin master:master [1051ms]
2022-12-13 14:00:58.138 [info] To https://github.com/some-user-name/my-first-app.git
b098c51..16d459f master -> master
Alternatively, when I enter my valid access token from GitHub into the password field, the sync works straight away, but my question remains: Where does that user number (22298273) come from? And why does the sync work without entering anything into the password field after a couple of attempts?
Update
After following some of the advices given in the comment, I still have the same behaviour:
>>> I performed a change, added a file via "Commit" and then pressed "Sync Changes" <<<
2022-12-15 14:54:21.810 [info] > git log --oneline --cherry master...master@{upstream} -- [1ms]
2022-12-15 14:54:22.351 [info] > git pull --tags -r origin master [537ms]
2022-12-15 14:54:22.351 [info] From https://github.com/gorgsenegger/my-first-app
* branch master -> FETCH_HEAD
2022-12-15 14:54:23.522 [info] > git ls-files --stage -- /home/johndoe/projects/my-first-app/src/app/servers/servers.component.html [0ms]
2022-12-15 14:54:23.528 [info] > git cat-file -s 573c25317a9597ab31b651934d4d309c74105cec [1ms]
2022-12-15 14:54:23.587 [info] > git show --textconv :src/app/servers/servers.component.html [0ms]
>>> Here VS Code asks for the password for my user id <<<
>>> I just pressed ESC <<<
2022-12-15 14:54:31.348 [info] > git push origin master:master [9530ms]
2022-12-15 14:54:31.348 [info] remote: Invalid username or password.
fatal: Authentication failed for 'https://github.com/gorgsenegger/my-first-app.git/'
>>> Now I pressed "Sync Changes" again, VS Code asks for the password for my user id <<<
>>> I just pressed ESC again <<<
2022-12-15 14:54:41.412 [info] > git log --oneline --cherry master...master@{upstream} -- [0ms]
2022-12-15 14:54:42.411 [info] > git push origin master:master [991ms]
>>> Despite NOT having entered anything into the password field, not my commit is pushed <<<
2022-12-15 14:54:42.412 [info] To https://github.com/gorgsenegger/my-first-app.git
0b0ca9a..319c84d master -> master
2022-12-15 14:54:42.421 [info] > git config --get commit.template [2ms]
2022-12-15 14:54:42.426 [info] > git for-each-ref --format=%(refname)%00%(upstream:short)%00%(objectname)%00%(upstream:track)%00%(upstream:remotename)%00%(upstream:remoteref) refs/heads/master refs/remotes/master [1ms]
2022-12-15 14:54:42.435 [info] > git status -z -uall [6ms]
2022-12-15 14:54:42.436 [info] > git for-each-ref --sort -committerdate --format %(refname) %(objectname) %(*objectname) [2ms]
2022-12-15 14:54:43.575 [info] > git config --get commit.template [1ms]
2022-12-15 14:54:43.580 [info] > git for-each-ref --format=%(refname)%00%(upstream:short)%00%(objectname)%00%(upstream:track)%00%(upstream:remotename)%00%(upstream:remoteref) refs/heads/master refs/remotes/master [2ms]
2022-12-15 14:54:43.588 [info] > git status -z -uall [5ms]
2022-12-15 14:54:43.588 [info] > git for-each-ref --sort -committerdate --format %(refname) %(objectname) %(*objectname) [1ms]
2022-12-15 14:54:43.682 [info] > git ls-files --stage -- /home/johndoe/projects/my-first-app/src/app/servers/servers.component.html [1ms]
2022-12-15 14:54:43.688 [info] > git cat-file -s 573c25317a9597ab31b651934d4d309c74105cec [1ms]
2022-12-15 14:54:43.740 [info] > git show --textconv :src/app/servers/servers.component.html [1ms]
2022-12-15 14:54:49.575 [info] > git pull --tags -r origin master [8159ms]
2022-12-15 14:54:49.575 [info] remote: Invalid username or password.
fatal: Authentication failed for 'https://github.com/gorgsenegger/my-first-app.git/'
I signed out of my GitHub account within VS Code and also first updated the VS Code entry in the Windows Credential Manager. When this didn't work I deleted the entry and tried again, to no avail.
I can enter my personal access token when the dialog comes up in VS Code and it works, but I have to do it every time when I click on Sync Changes
. And I still don't understand why I can click ESC
(multiple times) and eventually the sync is performed without entering any password/access token.