No prompt for username or password when pushing from git bash

Following the instructions in this lesson article I reached the stage where I have created a github repo and ran:

git push -u origin main

the problem I have however is that the article says at this point I should be prompted for my GitHub username and password (a token generated following instructions early in the article) however I wasn’t. Unlike the problem experienced in another post my push was actually successful and the files made it to the repo on github. The output of the command was as follows:

Enumerating objects: 3, done.
Counting objects: 100% (3/3), done.
Writing objects: 100% (3/3), 232 bytes | 232.00 KiB/s, done.
Total 3 (delta 0), reused 0 (delta 0), pack-reused 0
To https://github.com/[username - redacted]/git_practice.git
 * [new branch]      main -> main
branch 'main' set up to track 'origin/main'.

I’m concerned that I was able to make this update without entering a password or supplying the auth token. Could it be that my Github account is unsecure (I originally created it a long long time ago on a different course but didn’t really use it)? I’ve also uploaded a repo to Github via VS Code a couple months ago, though with lacking familiarity I don’t really remember how I ultimately managed to do this. Is it possible my credentials have been stored and used automatically? How may I find these?

The repo was created just now as instructed during the article, the only setting I changed was to make the repo private rather than public.

Hi! You weren’t asked about username and password because you already did it earlier. As you said, you’ve created your GitHub account and even uploaded a repo, so, I suppose, it was a time you did it and eventually forgot about it.
Actually, there is nothing to worry about, but if you want to strengthen security of your account, you may find helpful the official recommendations:

Ok thank you, looking through the article I was able to find I have Git Credential Manager authorised under Authorised OAuth Apps showing as used within the last week, so it must have been this.

Many thanks

1 Like

You’re welcome! Just glad I could help.