there. I am creating a basic website with files and folders I need inside a GitHub repo. I have tried extensively to push these files, but, I get the error that my authentication is invalid even though my username and password are correct. Furthermore, sometimes, it gives me the error that the "remote origin already exists." I want to push these files to my existing repo, "webapp." Also, below, I deleted my name for obvious reasons but provided the output and all the things I have done.
git init
Reinitialized existing Git repository in /Users/someone/PycharmProjects/allprojects/webpage/.git/
$ git commit -m "first commit"
On branch main nothing to commit, working tree clean
$ git remote add origin https://github.com/rishp66/webapp.git
fatal: remote origin already exists.
git push -u origin main
Output:
Username for 'https://github.com': ...
Password for 'https://...@github.com':
- remote: Support for password authentication was removed on August 13, 2021.
- remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
- fatal: Authentication failed for 'https://github.com/rishp66/webapp.git/'
I tried doing this with a personal access token as well for sometime as a password but that was invalid as well. Below are also logs of my previous commmits.
$ git log
commit 7dd2cb6954cf55f40ffc0c624f0d569ff23eab42 (HEAD -> main)
Author: N/A <my_email>
Date: Sat Feb 4 18:42:00 2023 -0500
first
commit 3bfbc0bc134a9d9bc885f19936894322ac7bf8b0
Author: N/A <my_email>
Date: Sat Feb 4 17:23:25 2023 -0500
initial commit