When cloning a repository or pushing changes to it, you may encounter the Repository Not Found error. At first glance, the error message may give the impression that the repository might not exist or could’ve been deleted. But in most cases, this is not the cause.

Instead, the repository exists, but there’s usually an access-related issue or some problem with the remote origin which leads to this error. We’ve listed the causes in detail, as well as ways to fix this error in the sections below.

What’s Causing the Repository Not Found Error?

How to Fix Repository Not Found?

Before you start, please keep in mind thatrepo URLs are case-sensitive. As such, fixing this error could be as simple as adjusting the case usage.

git-remote-v

You should first ensure that this isn’t an access issue. Even if you’re added as a collaborator, you may not have write access which could be causing this error. This scenario is surprisingly common, so it’s best to check with the repo owner regarding this. Additionally, it’s also worth confirming that the repo hasn’t been renamed.

If the remote origin has been changed or an incorrect value has been added, that can also cause this error. Here’s what you may do in such cases:

Resolve Credential Issues

Outdated credentials in the system credential manager can also lead to this error, as it would cause the authentication to fail. Here’s how you may clear the git credentials on Windows:

git-remote-rm-origin-add-origin

Here’s how you may do the same on Mac:

Additionally, if you utilize the git credential manager, you should remove and reinstall it. you may do so with the following commands:git credential-manager uninstallgit credential-manager install

This fix is very niche, but it’s still worth mentioning. One user using the Git It Write plugin on WordPress found that this error occurred because his IP reached the API rate limit. Basically, because this plugin didn’t authenticate, the requests were limited to 60 per hour.

github-credentials-windows

The Git It Write plugin has been updated to authenticate, so the issue shouldn’t be as common now. But there’s likely a limit to authenticated requests as well. If you suspect that this could be the issue in your case, you may test for it by switching to a different network orchanging your IPsome other way.

delete-keychain