I'm trying to push an existing repo to a new GitHub repo.
To do so, I had to generate a token, which I did, and which I copied onto my clipboard.
My understanding is that when I want to push to this new repo, I need to paste the token where I used to type my password. However, this still generates the remote: Support for password authentication was removed on August 13, 2021. Please use a personal access token instead.
error. What am I not understanding here?
Here is what my terminal window displays:
$ git push -u origin main
remote: Support for password authentication was removed on August 13, 2021. Please use a personal access token instead.
remote: Please see https://github.blog/2020-12-15-token-authentication-requirements-for-git-operations/ for more information.
fatal: Authentication failed for 'https://github.com/me/expt_results.git/'
even though I entered my username into the pop-up window and have tried (numerous times) both pasting the token and hand copying the token in lieu of my password.
I have also tried doing the following:
git remote remove origin
git remote add origin https://[TOKEN]@github.com/[USER]/[REPO]
git push origin main
as suggested in Authenticate with GitHub using a token, but with a similar lack of success, though a different error message.
$ git push origin main
remote: Permission to [USER]/[REPO] denied to [USER].
fatal: unable to access 'https://github.com/[USER]/[REPO]/': The requested URL returned error: 403
What am I doing wrong???