I am trying to clone, add some code to and commit the code to my private repository on Github. The issue is that whenever I do
git clone https://github.com/my-username/my-Repo.git
I get
remote: Invalid username or password.
fatal: Authentication failed for 'https://github.com/.../my_repo.git/'
I didn't have this issue before executing the following command
git credential-osxkeychain erase
Before executing above command I managed to clone the repo by using my personal access token, managed to execute git init
, git add blah.py
and git push
without any issues but nothing showed up on my github page.
Now, after removing the credentials from my keychain, when I enter the CORRECT username and password when cloning my private Github repository I get the remote: Invalid username or password.
error. I've both manually written my username and password into the terminal and copied from saved logins
on firefox, neither works and I know the username and password is correct since I can easily login to my Github account on github.com with the same information I enter into the terminal when attempting to clone my repo. Using the e-mail does not change the "invalid ..." error.
tl;dr How do you control a private repository on macosx via terminal?
Edit: I use 2FA