Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

After setting up two factor authentication, I get "Repository not found"

Tags:

github

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?

like image 736
vic Avatar asked Jul 16 '18 17:07

vic


People also ask

Why am I getting repository not found?

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.

How do I push two-factor authentication to GitHub?

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.


1 Answers

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.

like image 106
ragav ramachandran Avatar answered Oct 19 '22 03:10

ragav ramachandran