After our github has a two factor authentication setup, I can't do pull nor push on command-line due to an error of "repository not found".
C:\myproject>git push origin mybranch
Username for 'https://github.com': myname
Password for 'https://[email protected]':
remote: Repository not found.
fatal: repository 'https://github.com/myproject.git/' not found
How to resolve this issue?
Error: Repository not found. If you see this error when cloning a repository, it means that the repository does not exist or you do not have permission to access it.
Sign in to GitHub with your browser, using your username and password. If you have added a security key to your account, you'll first be prompted to insert and use a security key. To skip using a security key, click Authenticate with GitHub Mobile.
For folks who are facing the same issue,
Enabling 2FA requires us to use the Personal Access Token(PAT) instead of our password. PAT can be generated from Developer Settings tab. While generating the token make sure to give the necessary permissions(scope) like repo read/write access, etc.,
This worked for me.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With