Repository not found

Git OperationsRemote ErrorCommonLast updated: June 29, 2026Tested on:Git CLI v2.44GitHub APIJune 2026

Git could not find the remote repository, which usually indicates a spelling typo, a private repository access restriction, or a deleted repository.

Repository not found Quick Fix⏱️ Est. Fix Time: 2 minutes

Usually happens because:

  • Repository name spelling typo in remote URL path
  • Lack of permissions to view private repository directories
  • Repository renamed or deleted on remote master host

🔍 Quick Checklist:

What is Repository not found?

This error occurs when Git tries to download or query a remote repository, but the hosting server returns a 404 Not Found response. Because hosting providers (like GitHub) hide the existence of private repositories from unauthorized users to prevent reconnaissance, a mismatch in permissions or credentials will also trigger this generic 'repository not found' message instead of 'access denied'.

Common Causes

  • Spelling typo in repository name or URL: A simple spelling or capitalization typo in the remote URL.
  • Private repository visibility shielding: The repository exists and is private, but your credentials do not have access rights.
  • Repository has been deleted or moved: The repository was deleted by the owner or renamed (which breaks old URL links).
CauseFrequency
Missing access rights to private repository⭐⭐⭐⭐⭐
Spelling typo in namespace or repo name⭐⭐⭐⭐
Repository renamed or deleted on remote⭐⭐

Common Mistakes

  • Assuming the repository is missing when in reality it is a private repository and your active session lacks access authorization.
  • Capitalization errors inside the Git host path (URLs are case-sensitive on many corporate hosting systems).

How to Fix

1Verify URL spelling: Inspect and correct the spelling of the namespace and repository name.
2Authenticate with read permissions: Ensure your active SSH key or PAT has access to the private repository.
3Update remote URL: Update the remote tracking address using 'git remote set-url origin <new_url>'.

Git Operations & Verification

Inspect which remote URLs are currently tracked by your local repository repository configurations.

Verifying Remote Mapping Example
$ git remote -v

origin  https://github.com/wrong-user/private-repo.git (fetch)
origin  https://github.com/wrong-user/private-repo.git (push)

Platform Specific Fixes

Verify SSH connectivity to GitHub to check if your key is successfully authenticated.

Linux Config
ssh -T git@github.com
# Expected: Hi username! You've successfully authenticated...

Best Practices

  • Verify organization access settings inside your GitHub dashboard before requesting checkouts.
  • Use standard SSH clone strings (which avoid local HTTP credentials cache conflicts).

Frequently Asked Questions (FAQ)

Q: Why does GitHub say 'repository not found' instead of 'permission denied'?

To prevent hackers from discovering the names of private repositories, GitHub returns a generic 404 (Not Found) status for unauthorized requests.

Q: How do I check if my remote URL is correct?

Run 'git remote -v' to view the URLs mapped to 'origin'.

Q: What do I do if the repository was renamed?

Most Git providers set up automatic redirects, but you should update your remote URL manually using 'git remote set-url origin <new-url>'.

Q: Does this error happen on SSH clones?

Yes, if the public key isn't registered, SSH will return 'Repository not found' or 'Permission denied (publickey)' depending on provider rules.

Still having this problem?

Didn't solve your problem?

SuggestRequest Error