Reputation: 2816
After changing to 2 factory authentication, I get the following error when I try to pull/push to/from a remote branch such as
git pull origin master
:
remote: Repository not found.
fatal: repository 'https://github.com/my-organization/my-project.git/' not found
However, when I try to add the repository
git remote add origin https://github.com/my-organization/my-project.git
I get an error
fatal: remote origin already exists.
I follow this document to resolve invalid username or password error.
Now, How can I resolve this repository error?
Update:
I try to start out on the repository with
git clone https://github.com/my-organization/my-project.git
And I get the same error:
Cloning into 'my-project'...
git: 'credential-netrc' is not a git command. See 'git --help'. <-- don't know how this comes up
Username for 'https://github.com': my-username
remote: Repository not found.
fatal: repository 'https://github.com/my-organization/my-project.git/' not found
Upvotes: 0
Views: 353
Reputation: 164889
The error is telling you that it has a remote URL, but it cannot find a repository there. When you try to add another one, Git correctly tells you that you already have a remote for origin.
To change the URL, use git remote set-url origin <url>
. You probably need to remove that trailing slash, but to be sure copy the URL directly from Github's "Clone or Download" button.
If you're using 2-factor auth with https
URLs, you need to use your personal access token instead of your password. Or save a lot of headaches and use ssh.
Upvotes: 2