I'm using a different computer and I'm trying to clone one of my repos, but when I clone a repo, github prompts me to enter my credentials and I fail to authenticate:
Username for 'https://github.com':
Password for 'https://myusername@github.com:
remote: Invalid username or password.
fatal: Authentication failed for "my github repo url link"
I don't have a github.com email for my account, so I am confused what credentials it is looking for. I have already setup my git config like this:
git config user.name = "my username"
git config user.email = "my gmail"
git config user.password = "my password"
edit
From the points mentioned below, I must now use my personal access token as my password, what is the best way to cache my personal access token so I don't have to keep entering it when I clone,push,etc ?
The git config user.xxx part is only for commit authorship, and has nothing to do with remote hosting service authentication.
You need to enter your GitHub user account name and token (PAT -- Personal Access Token -- that you need to generate).
This is safer than entering your GitHub account password, not to mention that, if you have 2FA activated, the password would not work anyway.
Activate a credential cache in order to not have to renter it every time.
A cross-platform one is manager-core:
git config --global credential.helper manager-core