Error repository not found git clone

git clone gives the message fatal: repository 'url' not found I tried the options in the link, but it didn't work.
git clone <url>

gives the message fatal: repository ‘url’ not found

I tried the options in the link, but it didn’t work.

Trilarion's user avatar

Trilarion

10.4k9 gold badges64 silver badges102 bronze badges

asked Sep 20, 2014 at 8:56

Max's user avatar

7

As mentioned by others the error may occur if the url is wrong.

However, the error may also occur if the repo is a private repo and you do not have access or wrong credentials.

Instead of

git clone https://github.com/NAME/repo.git

try

git clone https://username:password@github.com/NAME/repo.git


You can also use

git clone https://username@github.com/NAME/repo.git

and git will prompt for the password (thanks to leanne for providing this hint in the comments).

answered May 24, 2015 at 21:52

Christian Fries's user avatar

Christian FriesChristian Fries

15.8k10 gold badges55 silver badges67 bronze badges

15

On macOS it’s possible that the cached credentials in the Keychain that git is retrieving are wrong.
It can be an outdated password or that it used the wrong credentials.

To update the credentials stored in OS X Keychain

Follow the instructions at:

https://help.github.com/articles/updating-credentials-from-the-osx-keychain/

If you want to verify this is the problem you can run clone with tracing.

$ GIT_CURL_VERBOSE=1 git clone https://github.com/YOUR-USERNAME/YOUR-REPOSITORY

Look for the header line «Authorization: Basic BASE64STRING» .
Take the base64 string and decode it to check what username:password was used.

$ echo <the key> | base64 --decode

Verify it’s the right username password you expected to use.

answered Jun 16, 2016 at 8:01

tsafrir's user avatar

tsafrirtsafrir

1,70112 silver badges13 bronze badges

4

If you are on Windows, the repository is private, and different or not longer correct credentials were saved once, you won’t have access to the repo. You will get the not found error without hinting in the failed-credential-direction. In order to reset the credentials on Windows, open Control Panel (Win+r control), select User Accounts and Credentials Manager. Locate the git account in Windows credentials (not Web credentials!) and erase this entry.

After that, cloning will pop up a login dialogue and you will be able to set these again.

Tested this with git-bash as shell

Search for

  • En: Win+s «Credential Manager»
  • NL: Win+s «Referentiebeheer»
  • DE: Win+s «Anmelde Informationsverwaltung»

answered Jan 8, 2020 at 9:50

theking2's user avatar

theking2theking2

1,8101 gold badge24 silver badges30 bronze badges

1

If your git repo is private, try this

git clone https://<USERNAME>:<PASSWORD>@github.com/<USERNAME>/<REPO_NAME>.git

Note: If you are using @ symbol in your password, use ‘%40’ to instead ‘@’

else use this

git clone https://github.com/<USERNAME>/<REPO_NAME>.git

—-Update:—-

Using a password in clone URL is now deprecated instead use the personal access token like below

Setting -> Developer Settings -> personal access tokens -> generate new token

git clone https://<Token>@github.com/<USERNAME>/<REPO_NAME>.git

answered Nov 27, 2020 at 15:16

Gopal's user avatar

GopalGopal

2,07323 silver badges17 bronze badges

2

If you are using two factor authorization (2FA) for your Github account then just use SSH option for cloning your repository:

enter image description here

answered Apr 1, 2018 at 3:56

Olegdater's user avatar

OlegdaterOlegdater

2,31122 silver badges20 bronze badges

0

Most probably, your URL is not valid.

If it is a http/https URL, you can quickly check, by hammering the URL into a browser. If that does not display anything at all, you know that the URL is invalid.

I assume you are speaking of a remote repository. The URLs should look somewhat like these:

https://github.com/user/repo2.git if you're using HTTPS
git@github.com:user/repo2.git if you're using SSH

answered Sep 20, 2014 at 9:03

Kai Mattern's user avatar

Kai MatternKai Mattern

3,0912 gold badges33 silver badges37 bronze badges

1

I was also having same issue. I was trying to clone the repo which was private and my git installed in osx has keychain which was not allowing me to clone the repo…

I tried

git clone https://username:password@github.com/NAME/repo.git 

but it didn’t work as my password was containing the field @.

I just ran

git credential-osxkeychain erase
host=github.com
protocol=https

command and press enter and it worked perfectly fine. Actually you need to remove the keychain already stored in the osx.

answered Jul 27, 2016 at 11:35

Vikas Chandra's user avatar

Vikas ChandraVikas Chandra

5551 gold badge9 silver badges22 bronze badges

I had the same problem (Repository not found) due to the fact that initially I logged in with an incorrect GitHub account. To fix it:

  1. Open Control Panel from the Start menu.
  2. Select User Accounts.
  3. Select «Manage your credentials» in the left hand menu.
  4. Delete any credentials related to Git or GitHub.

pmichna's user avatar

pmichna

4,72012 gold badges52 silver badges89 bronze badges

answered Oct 26, 2018 at 8:36

Yura's user avatar

YuraYura

2,7352 gold badges18 silver badges25 bronze badges

3

For me

git clone https://username@github.com/name/repo.git

worked.

I think this mainly happens because Private repo can’t be accessed directly.

Eric Aya's user avatar

Eric Aya

69.1k35 gold badges179 silver badges250 bronze badges

answered Jul 27, 2017 at 11:46

Manish Menaria's user avatar

Manish MenariaManish Menaria

21.5k3 gold badges20 silver badges23 bronze badges

1

What solved my problem, since I was having a «redirect/sign_in URL» or «repository not found» error

MacOS Users:

  1. Open spotlight (Command Space)
  2. Type keychain (Open keychain access.app)
  3. Search for repo domain (GitHub, GitLab, etc)
  4. Delete all keys related to this domain
  5. Try to clone again (with valid credentials)

Windows users should try similar steps, but Keychain would be Microsoft’s Credentials Manager instead or Windows Credentials depending on yours OS version. Make sure to clean both web and windows credentials if that’s the case.

Zoe stands with Ukraine's user avatar

answered May 2, 2018 at 12:57

Victor Oliveira's user avatar

Victor OliveiraVictor Oliveira

2,8796 gold badges45 silver badges74 bronze badges

3

git clone https://username@github.com/User/Repository.git will prompt for a password then clone.

answered Feb 24, 2019 at 5:37

Andrew Watters's user avatar

1

On github you can have the main repository and subfolders. Make sure that the URL that you are using is that of the main repository and not that of a folder. The former will succeed and the latter will produce the repository not found error. If you have a doubt you are in a subfolder, navigate up the repository chain till you find a page which actually specified the https URL and use that.

answered Jun 6, 2015 at 13:31

Nikhil George's user avatar

1

Step 1:
From your Github account, go to Settings
Account Settings
Then, Developer Settings
Developer Settings
Then Personal Access Token
PAT Settings
Then, Generate New Token (Give your password)
Generate Token

Now Fillup the form (scope/access permission of the repository) and click Generate token and Copy the generated Token (Copy and save it, it will be shown for the first time only, otherwise you have to generate it again), it will be something like ghp_sFhFsSHhTzMDreGRLjmks4TzuzgthdvfsrtaCopy Token

Step 2:
Now, copy the resource indicator:Resource Indicator

For example: https://github.com/AnwarXahid/sso-client-java-servlet.git and it is generated by https://github.com/**YOUR USERNAME**/YOUR REPO NAME.git

Finally, open terminal/ git bash and add the PAT token before resource indication:
For example: https://ghp_sFhFsSHhTzMDreGRLjmks4Tzuzgthdvfsrta@github.com/AnwarXahid/sso-client-java-servlet.git
Basically, it is generated by https://YOUR TOKEN@github.com/YOUR USERNAME/YOUR REPO NAME.git

So, the final command would like this: git clone https://YOUR TOKEN@github.com/YOUR USERNAME/YOUR REPO NAME.git

Press ENTER and your repo will be cloned to local!

Community's user avatar

answered Aug 23, 2021 at 6:16

Xahid's user avatar

XahidXahid

891 silver badge6 bronze badges

3

This is happening because of my old session state of other user remain: Below is quick solution for Windows users,

Open Control Panel from the Start menu
Select User Accounts
Select «Manage your credentials» in the left hand menu
Delete any credentials related to Git or GitHub

Once I did this, it started working for me.

answered Oct 8, 2018 at 12:42

Amjad Khan's user avatar

Amjad KhanAmjad Khan

611 silver badge3 bronze badges

For me the problems occurs because I have my old username/password settings saved for gitlab, so that I need to remove those credentials. I run the following command on my mac:

sudo su
git config --system --unset credential.helper

and do the clone again, enter the username and password. And everything is fine.

answered Oct 10, 2020 at 3:19

de li's user avatar

de lide li

8621 gold badge13 silver badges25 bronze badges

This issue started surfacing on my terminal after I enabled GitHub 2FA.

Now, I face this issue whenever I clone a private repository. This error:

remote: Repository not found.
fatal: repository ‘https://github.com/kmario23/repo-name.git/’ not found

is so awkward. Of course, I have this repo and I’m the owner of it.

Anyway, it seems the fix is now that we have to enter the GitHub username one more time when cloning a private repo. Below is an example:

                             add your username
                                |-------|
$ git clone --recursive https://kmario23@github.com/kmario23/repo-name.git

answered Dec 1, 2019 at 17:33

kmario23's user avatar

kmario23kmario23

55k13 gold badges155 silver badges148 bronze badges

0

enter image description here

Step 1:
Copy the link from the HTTPS

Step 2: in the local repository do

git remote rm origin

Step 3: replace github.com with username.password@github.com in the copied url

Step 4:

git remote add origin url

answered Jan 31, 2021 at 11:54

Viraj Singh's user avatar

Viraj SinghViraj Singh

1,54715 silver badges26 bronze badges

For me it worked by removing the credential.helper config and cloning the repository again

git config --global --unset credential.helper
git clone https://<repository>

answered Jun 22, 2020 at 3:54

linktoahref's user avatar

linktoahreflinktoahref

7,4893 gold badges32 silver badges49 bronze badges

0

git clone https://<USERNAME>@github.com/<REPONAME>/repo.git

This works fine. Password need to provide.

answered Jan 29, 2021 at 8:59

Janaka Abeytunge's user avatar

1

You may need to create an empty file named git-daemon-export-ok within the repository directory.

answered Jun 28, 2015 at 11:18

mono blaine's user avatar

mono blainemono blaine

1,0039 silver badges13 bronze badges

0

Authentication issue:
I use TortoiseGit GUI tool, I need to tell tortoise the username and password so that it can access to work with Git/GitHub/Gitlab code base.
To tell it,
rt click inside any folder to get TortoiseGit menu.
Here TortoseGit > Settings Window > Select Credentials in left nav tree
Enter
URL:Git url
Helper: Select windows if your windows credentials are same as the ones for Git or ‘manager’ if they are different
userName; Git User Name
Save this settings ans try again. You will be prompted for password and then it worked.

answered Feb 3, 2019 at 1:06

Rajesh Ram's user avatar

I’m a devops engineer and this happens with private repositories. Since I manage multiple Github organizations, I have a few different SSH keys. To overcome this ERROR: Repository not found. fatal: Could not read from remote repository. error, you can use

export GIT_SSH_COMMAND="ssh -o StrictHostKeyChecking=no -o User=git -i ~/.ssh/ssh_key_for_repo"

git clone git@github.com:user/repo.git

answered Jul 19, 2019 at 17:51

Brett Porter's user avatar

If you are using cygwin for git and trying to clone a git repository from a network drive you need to add the cygdrive path.

For example if you are cloning a git repo from z:/

$ git clone /cygdrive/z/[repo].git

answered Oct 26, 2018 at 8:46

Possibly you did login in another account, and that account doesn’t have access rights to this repo, if you’re using mac os, go to Keychain Access, search for gitlab.com and remove it and try to git clone again.

answered Sep 16, 2019 at 23:58

Hieu Vo's user avatar

Hieu VoHieu Vo

2,99528 silver badges31 bronze badges

In my case. repository is private I can’t access it directly. On ly way to use Github Desktop app to fetch this repo.

answered Apr 11, 2020 at 6:06

uzair raza's user avatar

uzair razauzair raza

151 silver badge8 bronze badges

You should check if you have any other github account marked as «default». When trying to clone a new repo, the client (in my case BitBucket) will try to get the credentials that you have set «as default». Just mark your new credentials «as default» and it will allow you to clone the repo, it worked for me.

answered Jun 25, 2020 at 16:25

Roberto Escalon's user avatar

Another reason for this error, if you are on github, and trying to use deploy keys for multiple repos, you will find this does not work.

In that case you need to create a machine user, however if you don’t and you try to clone any repo besides the one with the deploy key, you will get this error.

answered Sep 14, 2020 at 1:10

quickshiftin's user avatar

quickshiftinquickshiftin

64.1k9 gold badges66 silver badges88 bronze badges

I had this issue recently and after quite a bit of debugging I realized that the password that I got from a password generator had an «&» in it, which GitHub accepted, but Visual Studio Code did not like when I tried to clone the reopo. Not sure which system threw the error, but it made me realize that stage characters in your user name or password could also cause this issue.

answered Jun 14, 2021 at 11:12

phunder's user avatar

phunderphunder

1,5473 gold badges15 silver badges30 bronze badges

I had this same problem in Windows, when I tried to use Git on the command line in Git Bash terminal while having also GitHub desktop installed. So, I did not have any problem using desktop app, but trying to clone in Git Bash failed. There are lots of advice for deleting any previous Git and GitHub related credentials, but this would then mess up GitHub desktop so it is not a good solution if you want to use both GUI and command line methods.
Surprisingly, when I just used Windows command prompt interface (Git CMD) instead of Git Bash, it started working. So, it seems Git Bash has problems co-operating with GitHub desktop configurations, but Windows command prompt works ok.

answered Sep 9, 2021 at 16:53

Malakias's user avatar

HTTPS cloning errors

There are a few common errors when using HTTPS with Git. These errors usually indicate you have an old version of Git, or you don’t have access to the repository.

Here’s an example of an HTTPS error you might receive:

> error: The requested URL returned error: 401 while accessing
> https://github.com/USER/REPO.git/info/refs?service=git-receive-pack
> fatal: HTTP request failed
> Error: The requested URL returned error: 403 while accessing
> https://github.com/USER/REPO.git/info/refs
> fatal: HTTP request failed
> Error: https://github.com/USER/REPO.git/info/refs not found: did you run git
> update-server-info on the server?

Check your Git version

There’s no minimum Git version necessary to interact with GitHub, but we’ve found version 1.7.10 to be a comfortable stable version that’s available on many platforms. You can always download the latest version on the Git website.

Ensure the remote is correct

The repository you’re trying to fetch must exist on GitHub.com, and the URL is case-sensitive.

You can find the URL of the local repository by opening the command line and
typing git remote -v:

$ git remote -v
# View existing remotes
> origin  https://github.com/ghost/reactivecocoa.git (fetch)
> origin  https://github.com/ghost/reactivecocoa.git (push)

$ git remote set-url origin https://github.com/ghost/ReactiveCocoa.git
# Change the 'origin' remote's URL

$ git remote -v
# Verify new remote URL
> origin  https://github.com/ghost/ReactiveCocoa.git (fetch)
> origin  https://github.com/ghost/ReactiveCocoa.git (push)

Alternatively, you can change the URL through our
GitHub Desktop application.

Provide an access token

To access GitHub, you must authenticate with a personal access token instead of your password. For more information, see «Creating a personal access token.»

If you are accessing an organization that uses SAML SSO and you are using a personal access token (classic), you must also authorize your personal access token to access the organization before you authenticate. For more information, see «About authentication with SAML single sign-on» and «Authorizing a personal access token for use with SAML single sign-on.»

Check your permissions

When prompted for a username and password, make sure you use an account that has access to the repository.

Tip: If you don’t want to enter your credentials every time you interact with the remote repository, you can turn on credential caching. If you are already using credential caching, please make sure that your computer has the correct credentials cached. Incorrect or out of date credentials will cause authentication to fail.

Use SSH instead

If you’ve previously set up SSH keys, you can use the SSH clone URL instead of HTTPS. For more information, see «About remote repositories.»

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. There are a few solutions to this error, depending on the cause.

Check your spelling

Typos happen, and repository names are case-sensitive. If you try to clone git@github.com:user/repo.git, but the repository is really named User/Repo you will receive this error.

To avoid this error, when cloning, always copy and paste the clone URL from the repository’s page. For more information, see «Cloning a repository.»

To update the remote on an existing repository, see «Managing remote repositories».

Checking your permissions

If you are trying to clone a private repository but do not have permission to view the repository, you will receive this error.

Make sure that you have access to the repository in one of these ways:

  • The owner of the repository
  • A collaborator on the repository
  • A member of a team that has access to the repository (if the repository belongs to an organization)

Check your SSH access

In rare circumstances, you may not have the proper SSH access to a repository.

You should ensure that the SSH key you are using is attached to your personal account on GitHub. You can check this by typing
the following into the command line:

$ ssh -T git@github.com
> Hi USERNAME! You've successfully authenticated, but GitHub does not
> provide shell access.

If the repository belongs to an organization and you’re using an SSH key generated by an OAuth App, OAuth App access may have been restricted by an organization owner. For more information, see «About OAuth App access restrictions.»

For more information, see Adding a new SSH key to your GitHub account.

Check that the repository really exists

If all else fails, make sure that the repository really exists on GitHub.com!
If you’re trying to push to a repository that doesn’t exist, you’ll get this error.

Error: Remote HEAD refers to nonexistent ref, unable to checkout

This error occurs if the default branch of a repository has been deleted on GitHub.com.

Detecting this error is simple; Git will warn you when you try to clone the repository:

$ git clone https://github.com/USER/REPO.git
# Clone a repo
> Cloning into 'repo'...
> remote: Counting objects: 66179, done.
> remote: Compressing objects: 100% (15587/15587), done.
> remote: Total 66179 (delta 46985), reused 65596 (delta 46402)
> Receiving objects: 100% (66179/66179), 51.66 MiB | 667 KiB/s, done.
> Resolving deltas: 100% (46985/46985), done.
> warning: remote HEAD refers to nonexistent ref, unable to checkout.

To fix the error, you’ll need to be an administrator of the repository on GitHub.com.
You’ll want to change the default branch of the repository.

After that, you can get a list of all the available branches from the command line:

$ git branch -a
# Lists ALL the branches
>   remotes/origin/awesome
>   remotes/origin/more-work
>   remotes/origin/new-main

Then, you can just switch to your new branch:

$ git checkout new-main
# Create and checkout a tracking branch
> Branch new-main set up to track remote branch new-main from origin.
> Switched to a new branch 'new-main'

Fix Git’s repository not found error

There’s nothing worse than joining a new development team and eagerly cloning the existing source code repo only to run head first into Git’s ‘fatal: repository not found’ error. For those who struggle with that problem, here are five potential fixes to the frustrating repository not found error message.

1. You did not authenticate

If you attempt to connect to a private GitHub or BitBucket repository and fail to authenticate, you will receive the repository not found error. To ensure you are indeed authenticating, connect to the repository and include your username and password in the Git URL:

git clone https://mcnz:[email protected]/cameronmcnz/private-github-repo.git


2. Your password has changed

Have you changed your password lately? If you connect from a Microsoft-based workstation, the Windows Credentials Manager may transparently submit an old password every time you clone, pull or fetch. Make sure your computer doesn’t cache any old, out of date passwords and cause your connection to be rejected.

3. You are not a collaborator

You may authenticate successfully against GitHub or GitLab, but if you haven’t been made a collaborator on the project, you won’t be able to see the repository and will again trigger the fatal: repository not found exception. If you’re not a collaborator on the project, contact one of the GitHub or BitBucket repository administrators and have them add you to that role.

4. Incorrect case or a word misspelled

If your source code management tool is hosted on a Linux distribution, the repository name may be case sensitive. Also watch out for creative repository spellings, such as a zero instead of the letter O, or a one in place of the letter L. If you can copy and paste the git clone command from provided documentation, do that.

5. The git repository has been deleted

If the repository was deleted or renamed, you’ll obviously hit a Git repository not found error when you attempt to clone or fetch from it. If all else fails, check with the team lead to ensure that the remote repository does indeed still exist. One way to fix that problem is to log into your DVCS tool as an administrator and actually create the Git repository.

If you have any more insights on why developers might run into Git’s ‘fatal: repository not found‘ error, please add your thoughts to the comments.

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?

Here are the most common reasons for the Repository Not Found error:

  • The remote origin has been changed or set incorrectly.
  • You haven’t been added as a collaborator, or you don’t have write access.
  • Authentication issues due to the credential manager.

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

Get Access to Repo

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.

Check Remote Origin

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

  1. Use cd to change directories to the local project directory.
  2. Enter git remote -v and check that the remote origin is accurate. Make sure there are no minor issues such as http:// in place of https://, or using the HTTPS format when you’re supposed to use SSH.
    git-remote-v
  3. If the remote origin needs to be modified, you can do so with the following command:
    git remote set-url origin <RepoURL>
  4. Alternatively, you can also remove the remote origin with the git remote rm origin command, then re-add it. When doing so, it’s worth checking that the error isn’t due to an authentication issue by adding your username to the url in the following fashion:
    git remote add origin https://username@github.com/username/reponame.git
    git-remote-rm-origin-add-origin
  5. This will prompt a reauthentication, and you may be asked to generate a personal access token.

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 can clear the git credentials on Windows:

  1. Press Win + R, type control, and press Enter.
  2. Go to User Accounts > Credential Manager > Windows Credentials.
    github-credentials-windows
  3. Expand and remove all the git credentials.

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

  1. Press Command + Shift + U and open the Keychain app.
  2. Select the git keychains from the list, right-click them, or choose File > Delete keychain > Delete references.
    delete-keychain

Additionally, if you use the git credential manager, you should remove and reinstall it. You can do so with the following commands:
git credential-manager uninstall
git credential-manager install

Git Request Limit

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.

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 can test for it by switching to a different network or changing your IP some other way.

A quick guide to fix error Git — remote: fatal Repository not found in simple 9 ways

1. Overview

In this tutorial, we’ll learn how to fix the «Git — remote: fatal Repository not found» issue in 9 different ways.

You might have seen this error while cloning the repository or while pushing the commits to the remote repository.

This error can be fixed in simple ways.

[Fixed] Git - remote: Repository not found

If you are new to programming and developing then you might have not set remote repo URL on your local repo. And trying to push the changes to remote.

This is needed when you downloaded the project as a zip file.

In this case, you need to set the remote base url to the local repo using the «git remote» command.

Follow the below steps.

git remote set-url origin https://github.com/JavaProgramTo/Kotlin-Demo.git

git add *.java
git commit -m "commit title"
git push origin master

3. Fix 2 — Git — remote: Repository not found

If the above is not your case, then you need to make sure that the remote URL is the correct one is pointing out.

Use git remote command as below.

git remote -v
origin	https://github.com/JavaProgramTo/Kotlin-Demo.git (fetch)
origin	https://github.com/JavaProgramTo/Kotlin-Demo.git (push)

If it is showing the right URL then verify it on remote whether it is the correct one or not. If not the correct one then you need to follow fix 1 to set the correct remote repo.

4. Fix 3 — Git — remote: Repository not found

Verify if your password has been reset recently. If you have changed so please make sure the new password is fetched from the credential manager on windows or keychain access on mac.

Sometimes, an old password will be used and a new one is not cached yet.

In this case, Remove all github.com credential details from the system. 

you need to clear the git related info from the credential manager and remove it from keychain access.

On windows

Follow the below commands on windows. After this, you should be able to push and pull the changes.

$ git credential-manager uninstall

$ git credential-manager install

On Mac machine

Open Keychain Access and find your password account in the password category ( you can search it on the top right keychain access page)

Once you find it, delete all keys related to your git source control and then try it again from the clone.

Before this take the backup of your uncommitted changes.

5. Fix 4 — Git — remote: Repository not found

This is a temporary fix and not recommended for the long term.

On Windows

  • Go to the git folder and go inside the .git folder
  • Open ‘config’ file using notepad or any other editor
  • Change your URL from https://github.com/username/repo_name.git to https://username:password@github.com/username/repo_name.git
  • Save and Push the code, it will work.

Here, you need to save the password and security threat.

On Mac

If the GitHub entry is not present in keychain access then you can clone the app in a different way as below.

git clone https://username@github.com/org/repo.git

Follow the below steps.

  • username with your GitHub username
  • org with your organisation name
  • repo with the repository name

6. Fix 5 — Git — remote: Repository not found

Just run the git remote update command which updates the local repo with the remote repo and its credentials.

If this command is executed without any issues then your issue will be resolved.

7. Fix 6, 7, 8, 9- Git — remote: Repository not found

There might be chances of any one of the following.

7.1 If you are not a collaborator, then you may successfully authenticate the GitHub but can not clone or push the changes to the repository as long you are not a collaborator.

7.2 In case of any spelling issues

7.3 If the git remove -v has set to HTTPS but your repo is pointing to the ssh. In this case, you need to remove the ssh and add HTTPS.

git remote remove origin
git remote add origin https://github.com/JavaProgramTo/Kotlin-Demo.git

7.4 Remote repository is not found and deleted.

8. Conclusion

In this article, we’ve seen all versions of fixes on git error «fatal: repository not found error».

Понравилась статья? Поделить с друзьями:
  • Error repository not found fatal could not read from remote repository
  • Error resolving pool 0 ubuntu pool ntp org name or service not known 2
  • Error resolving pool 0 freebsd pool ntp org
  • Error resolving function nvmldevicesetgpulockedclocks
  • Error reporting strict standards