Git failed with a fatal error repository not found

If you're having trouble cloning a repository, check these common errors.

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.

I am using Visual Studio 2017 Community Edition (CE), and I have signed into my Microsoft account and I am connected to VSTS. I can see all my projects and repositories, but when I attempt to pull/fetch/push any changes I get the following error:

Error encountered while pushing to the remote repository: Git failed with a fatal error.
PushCommand.ExecutePushCommand

And accordingly for the fetch and pull commands too.

I installed Git for Windows on the Visual Studio 2017 installer and not only is it failing to work with VSTS, I am unable to work with any of my GitHub repositories too. Has anyone else noticed this? It’s happened on two of my machines so far.

Visual Studio 2015 Enterprise Edition (EE) and CE work completely fine for me.

It seems that this issue has gotten far more recognition that I thought it would which leads me to believe that this is an issue with how Visual Studio is dealing with Git. I have also noticed that every time I update Visual Studio, this problem pops back up, and I have to go through the steps in some of the answers below to get Git working again. I’m not sure why this is happening, and I also don’t know if Microsoft are planning to resolving this issue.

Peter Mortensen's user avatar

asked Mar 8, 2017 at 9:48

sham's user avatar

3

After I changed the generic credentials from Control PanelUser AccountsCredential Manager for Git, it worked for me.

Enter image description here

Peter Mortensen's user avatar

answered Jun 8, 2018 at 18:26

wbing520's user avatar

wbing520wbing520

1,4811 gold badge9 silver badges9 bronze badges

11

I’m going to add a solution here that the previous answers have not already mentioned, but this is what fixed it for me.

  1. Navigate to C:Program Files (x86)Microsoft Visual Studio2017CommunityCommon7IDECommonExtensionsMicrosoftTeamFoundationTeam Explorer and delete the Git folder.

  2. Make sure that there is no version of Git installed on your system, remove it by going to Control PanelProgram and Features (TortoiseGit does not need to be removed from my experience, just native git installations).

  3. Open up the Visual Studio 2017 installer and untick «Git For Windows» in installation options.

  4. Head over to the Git website and install the latest version of Git for Windows.

  5. Go back into the Visual Studio installer and tick «Git for Windows» again. It will not download a new version even though it may look like it is. After that is done, your Git should be fine with VSTS and TF Explorer.

Peter Mortensen's user avatar

answered Apr 6, 2017 at 14:16

sham's user avatar

shamsham

3,6414 gold badges14 silver badges22 bronze badges

12

I had a different problem. My computer contained older OpenSSL DLL files in system32 and syswow64 so to fix my problem, I had to copy libeay32.dll and ssleay32.dll from one folder to another folder within the Git folders of Visual Studio 2017.

FROM: C:Program Files (x86)Microsoft Visual Studio2017vs_editionCommon7IDECommonExtensionsMicrosoftTeamFoundationTeam ExplorerGitmingw32bin

TO: C:Program Files (x86)Microsoft Visual Studio2017vs_editionCommon7IDECommonExtensionsMicrosoftTeamFoundationTeam ExplorerGitmingw32libexecgit-core

Ref.: Git — Can’t clone remote repository

Peter Mortensen's user avatar

answered Mar 9, 2017 at 8:42

flatrick's user avatar

flatrickflatrick

5283 silver badges9 bronze badges

7

In Control PanelAll Control Panel ItemsCredential Manager ==> Windows Credentials
Remove Git:http://……..

and Retry..

Enjoy !

answered May 2, 2019 at 9:49

Abdellah Azizi's user avatar

2

I tried a lot and finally got it working with some modification from what I read in Git — Can’t clone remote repository:

  1. Modify Visual Studio 2017 CE installation → remove Git for windows (installer → modify → single components).

  2. Delete everything from C:Program Files (x86)Microsoft Visual Studio2017CommunityCommon7IDECommonExtensionsMicrosoftTeamFoundationTeam ExplorerGit.

  3. Modify Visual Studio 2017 CE installation → add Git for windows (installer → modify → single components)

  4. Install Git on windows (32 or 64 bit version), having Git in system path configured.

Maybe point 2 and 3 are not needed; I didn’t try.

Now it works OK on my Gogs.

Peter Mortensen's user avatar

answered Mar 8, 2017 at 10:35

AngelBlueSky's user avatar

2

This is the error I was getting:

Git failed with a fatal error.
pull --verbose --progress --no-edit --no-stat --recurse-submodules=no origin

I tried all the previous methods, but they didn’t work. Later I found out that there were some conflicts in the code (see the Visual Studio 2017 output window).

I simply reverted the code and it worked.

Peter Mortensen's user avatar

answered Mar 22, 2017 at 10:44

GorvGoyl's user avatar

GorvGoylGorvGoyl

38.6k26 gold badges213 silver badges204 bronze badges

I once had such an error from Git while I was trying to synchronise a repository (I tried to send my commits while having pending changes from my coworker):

Git failed with a fatal error.
pull —verbose —progress —no-edit —no-stat —recurse-submodules=no origin

It turned out that after pressing the Commit all button to create a local commit, Visual Studio had left one file uncommitted and this elaborated error message actually meant: «Commit all your changes».

That missing file was Entity Framework 6 model, and it is often shown as uncommitted file although you haven’t changed a thing in it.

You can do commit all or undo all changes that are not committed.

Peter Mortensen's user avatar

answered Jul 23, 2017 at 16:35

ZenekMetalGuru's user avatar

2

This appears to happen in VS 2017 when there is a pending commit that would conflict with the pull. If you go to a command terminal and do a «git pull origin», you will usually get the error that is the source of the confusion. To solve, check in all your changes in VS 2017 and then try the pull or sync again from VS 2017. Needless to say … this is not desired behavior in VS 2017.

answered Oct 26, 2017 at 9:02

GGleGrand's user avatar

GGleGrandGGleGrand

1,5431 gold badge20 silver badges45 bronze badges

I had the same issue. The following steps solved the problem for me:

  1. Backup and delete «C:Program Files (x86)Microsoft Visual Studio 14.02017ProfessionalCommon7IDECommonExtensionsMicrosoftTeamFoundationTeam ExplorerGit»
  2. Install latest version of Git: https://git-scm.com/download/win

Peter Mortensen's user avatar

answered Mar 13, 2017 at 16:11

Vortex852456's user avatar

2

I had the same issue. Restarting Visual studio worked for me… You may try it before reinstalling stuff.

answered Jun 5, 2017 at 19:18

Éric Bergeron's user avatar

I’m using GitKraken and Visual Studio 2017.

When GitKraken clones a repository, it leaves fetch address like «git@github.com:user/Repo.git», instead of «https://github.com/user/Repo.git».

To fix that, go to Team ExplorerSettingsRepository SettingsRemotesEdit, and change «git@» to «https://» and «:» to «/».

Peter Mortensen's user avatar

answered Dec 23, 2017 at 22:18

Avius's user avatar

AviusAvius

3613 silver badges9 bronze badges

I had this problem after changing the git access password!

I had to reset the credentials through the PowerShell console.

At the git repository folder level, the script was as follows:

git config --system --unset credential.helper

git config --system credential.helper store

git fetch

You will be prompted for the user and then the password.

The next command will no longer request authentication:

git fetch

answered Feb 6, 2019 at 13:20

Wagner Melo's user avatar

enter image description here

When i do pull/fetch/push i got the above error in my output window, i followed the below soloution , it resovled my issue.

If you are using visual studio 2017 enterprise edition, replace the userId with your user id in the below command and execute this command in windows run window(windows key + R).

runas /netonly /user:UserId «C:Program Files (x86)Microsoft Visual Studio2017EnterpriseCommon7IDEdevenv.exe»

enter image description here

This will prompt for password, enter your password. A new visual studio instance will open and will start working properly…

answered Aug 13, 2019 at 12:49

Rex Andrew's user avatar

Rex AndrewRex Andrew

3782 silver badges8 bronze badges

0

Wow! There are so many solutions to this problem!

Try this easy one!

Change your password!

Just the other day, I started getting this notice that my password would expire in 14 days. Now 2 days later, I am getting this error:

enter image description here

I really didn’t feel like hacking git or OpenSSL libraries, so I just changed the Windows password on my computer and it worked!

Update

Then it started happening again. From Team Explorer go to Sync. Then do Actions > Open Command Prompt. In the command prompt type git push origin. That might work for you.

answered Oct 12, 2018 at 16:05

Jess's user avatar

JessJess

23k19 gold badges122 silver badges141 bronze badges

1

I had a very similar problem and the instructions from a tech at Microsoft fixed it for me:

  • Close all instances of Visual Studio.
  • Open the Task Manager and check if any TFS Services are running. Select each of them and click on End Process Tree.
  • Browse to the folder below and delete all the contents and folders in %LocalAppData%MicrosoftTeam Foundation{version}Cache
  • Go to Control Panel -> User Accounts -> Manage your Credential -> Windows Credential, select the VSTS URL to remove it
  • Then go to «C:UsersUSER NAMEAppDataLocalGitCredentialManagertenant.cache» and delete it
  • Also go to «C:UsersUSER NAMEAppDataLocal.IdentityService» and delete it

answered Dec 3, 2019 at 22:43

Casey's user avatar

CaseyCasey

814 bronze badges

I ran into this issue as well. I had sync’d my code earlier in the day so it made no sense that it suddenly gave this Git error. Restarting Visual Studio did not make any difference. After reviewing the above answers and not finding any clear solution, I decided to try syncing outside of Visual Studio using TortoiseGit which I already had installed. This worked. I was then able to sync within Visual Studio normally. If you don’t already have TortoiseGit, you may download it (free) from tortoisegit.org.

answered Jun 26, 2017 at 19:48

Jerry's user avatar

JerryJerry

411 silver badge3 bronze badges

1

In my case, Windows had ran an update and was waiting to restart the PC. I hadn’t seen any notifications but, well… turning it off and turning it on again fixed the problem.

Try that first before monkeying with any of these Visual Studio directories and applications.

Peter Mortensen's user avatar

answered Jun 16, 2017 at 13:26

RLH's user avatar

RLHRLH

14.9k21 gold badges94 silver badges180 bronze badges

I got the following error messages using Visual Studio 2017 CE.

Failed to push to the remote repository. See the Output window for more details.

The output window showed the following:

Error encountered while pushing to the remote repository: Git process failed unexpectedly.
PushCommand.ExecutePushCommand

I tried to push changes using GitHub Desktop. It shows the following error message.

Cannot push these commits as they contain an email address marked as private on GitHub.

That’s It. Solution:

open GitHub account >> Settings >> Emails >> Uncheck «Keep my email address private»

It’s done. That was the problem in my case.

Peter Mortensen's user avatar

answered Jul 3, 2017 at 5:05

Pranav's user avatar

1

I got it working by removing username@ from http://username@asdf/xxx/yy/zzz.git in the repository settings:

Team ExplorerSettingsRepository SettingsRemotesEdit

Peter Mortensen's user avatar

answered Jun 1, 2018 at 8:09

Michael Nylund's user avatar

I had the same error pop up in VS 2017 when trying to delete a remote branch. The issue was that the branch was not on the server (using TFS2018 with GIT), but somehow Visual Studio did have it show up in the «remote/origin» section. This meant that I could not delete the remote branch (VS was giving out this error, while the server explorer didn’t show up the branch at all).

Here’s how to fix it (tested in VS 2017):

  1. In Visual Studio, double click on your «rogue» remote branch;
  2. VS should have now created a local branch from it;
  3. Right click on the local branch, select «Unset remote branch»;
  4. Right click on the local branch, select «Push branch»;
  5. You should now have a true corresponding remote branch;
  6. Delete the remote branch, then the local branch.

Hopefully it will help someone who ends up on this thread having the same issue as me.

answered Jun 13, 2019 at 12:43

XYZ's user avatar

I opened Credential Manager in Windows (not Visual Studio), selected «Windows Credentials», found my git:https//stash….com Generic Credential, clicked the bubble arrow down to make visible the User name and Password fields with Edit button. Clicked Edit, and put in my correct password there. Then started work right after that, no need to close anything.

answered Nov 2, 2020 at 13:20

MAQ's user avatar

0

I also had this issue after I got wget from the GNU tools, and copied it right into c:windows. The libeay.dll and libssl.dll files were also in the archive. When those were in c:windows, I had this issue. Removing them immediately fixed it. So, check if you have these .DLLs somewhere in your path, VS may be picking up some other software’s version of these instead of using the ones it expects.

Community's user avatar

answered Aug 19, 2017 at 23:36

Nick Pirocanac's user avatar

AngelBlueSky’s answer worked partially for me. I had to execute these additional lines to clean the Git global configuration after step 4:

git config --global credential.helper wincred
git config http.sslcainfo "C:/Program Files/Git/mingw64/ssl/certs/ca-bundle.crt"
git config --global --unset core.askpass
git config --global --unset mergetool.vsdiffmerge.keepbackup
git config --global --unset mergetool.vsdiffmerge.trustexitcode
git config --global --unset mergetool.vsdiffmerge.cmd
git config --global --unset mergetool.prompt
git config --global --unset merge.tool
git config --global --unset difftool.vsdiffmerge.keepbackup
git config --global --unset difftool.vsdiffmerge.cmd
git config --global --unset difftool.prompt
git config --global --unset diff.tool

Then git config -l (executed from any git repo) should return only this:

core.symlinks=false
core.autocrlf=false
core.fscache=true
color.diff=auto
color.status=auto
color.branch=auto
color.interactive=true
help.format=html
diff.astextplain.textconv=astextplain
rebase.autosquash=true
user.name=xxxxxxxxxxxx
user.email=xxxxx@xxxxxx.xx
credential.helper=wincred
core.bare=false
core.filemode=false
core.symlinks=false
core.ignorecase=true
core.logallrefupdates=true
core.repositoryformatversion=0
remote.origin.url=https://xxxxxx@bitbucket.org/xxx/xxx.git
remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
branch.master.remote=origin
branch.master.merge=refs/heads/master
branch.identityserver.remote=origin
branch.identityserver.merge=refs/heads/identityserver
http.sslcainfo=C:/Program Files/Git/mingw64/ssl/certs/ca-bundle.crt

Run the git status and git fetch commands to validate that it works from the command line.

Then go to Visual Studio, where your repositories should be back, and all sync/push/pull should work without issues.

Peter Mortensen's user avatar

answered Jun 20, 2017 at 12:02

Softlion's user avatar

SoftlionSoftlion

12.1k10 gold badges57 silver badges88 bronze badges

After installing the last version of Git for Windows you must to open the configuration file to edit:

git config --global --edit

Click Insert, remove all the settings, click Esc, type :wq and, Enter to save.

Now you can clone the repository by Bash or IDE with a valid user.

Peter Mortensen's user avatar

answered Sep 11, 2017 at 17:25

johnander11's user avatar

In my case I didn’t have to do anything so drastic as uninstalling Git as per some of the answers here; I just had to use the command line instead of Visual Studio.

Open up cmd at your solution’s root and enter:

git pull

You will then be told exactly what the issue is. In my case it told me that I had uncommitted changes that would have been overwritten and that I needed to commit them before I could continue.

Once I had done this the pull succeeded, and I could resolve the conflict in the merge tool.

TLDR

Use the command line instead of Visual Studio to get a more complete error message.

Community's user avatar

answered Sep 21, 2017 at 11:00

Ben's user avatar

BenBen

5,4658 gold badges41 silver badges64 bronze badges

1

I was getting similar issues. In Visual Studio 2017, with Rebase option I solved my issue.

I am having only a master branch. I rebase from master to origin/master (means to the same branch) and clicked Rebase. Before doing Rebase, the status was, I was committed my changes however not able to push/sync as my local branch base and Git code base was not synchronised state.

Peter Mortensen's user avatar

answered Nov 21, 2017 at 14:18

Pallavi Kulkarni - Dhepe's user avatar

Compounded the problem by deleting the local repo so I could clone a fresh copy. I was faced with new error «git cannot be found Git failed with a fatal error.fatal: repository ‘xyz’ not found»

I tried everything suggestions i google about with no resolution.
The following simple step worked for me and I am adding it to the growing list of possible resolutions:

git config —get http.proxy result is http://google.com:80

this is not right so i got rid of it.

git config —global —unset http.proxy

answered Jun 26, 2018 at 15:25

CodesOfPSJ's user avatar

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.

    Table of contents

  • GitHub Community
  • Git clone with https error — fatal: repository not found
  • Git Push ERROR: Repository not found
  • Git Clone — Repository not found
  • Fatal: repository ……. not found
  • remote: Repository not found (only on VSCode)
    #3109

I have a similar issue to Marvelous-Software. I created/initialized a local repo (“testrepo”) in Bash/Git, added a file and did an initial commit.

git remote set-url origin https://[email protected]/aceofwings/RotairERP.git
git remote set-url origin https://[email protected]/aceofwings/RotairERP.git

Github repository not found. fatal error remote repository not found, after supposedly swtiching accounts

Git is caching your login credentials. Use this to disable it: git config —system —unset credential.helper The git config user data is only used as an identity for commits, although …

git init
git add README.md
git commit -m "first commit"
git remote add origin https://github.com/myaccount/myrepo.git
git push -u origin master
git config user.email "[email protected]"
git config user.password "secondaccountpassword"
git config --global user.email "[email protected]"
git config--global user.password "secondaccountpassword"
git config --system --unset credential.helper

Git clone with https error — fatal: repository not found

Here’s some things I have tried with no success: Verified the validity of the URL — Checked spelling and case. I am able to access the repo URL and download its contents through my …

$ git clone https://github.com/usernamex/privat-repo.git
cloning into 'privat-repo'...
Username for 'https://github.com':usernamex
Password for 'https://[email protected]':
remote: Repository not found.
fatal: repository 'https://github.com/usernamex/privat-repo.git/' not found
git clone https://username:[email protected]/usernamex/privat-repo.git
git clone https://github.com/USERNAME/REPO.git
git clone [email protected]:USERNAME/REPO.git
[remote "origin"]
    url = https://github.com/USERNAME/REPO.git
[remote "origin"]
    url = [email protected]:USERNAME/REPO.git
[remote "origin"]
        url = [email protected]:USERNAME/REPO.git
        fetch = +refs/heads/*:refs/remotes/origin/*
remote: Enumerating objects: 10642, done.
remote: Total 10642 (delta 0), reused 0 (delta 0), pack-reused 10642
Receiving objects: 100% (10642/10642), 510.06 MiB | 993.00 KiB/s, done.
Resolving deltas: 100% (7509/7509), done.
Updating files: 100% (2324/2324), done
remote: Repository not found.
fatal: repository 'https://github.com/workrepo/repository_I_needed.git/' not found

Git Push ERROR: Repository not found

I am having a very strange problem with git and github. When I try and push, I am getting: git push -u origin master ERROR: Repository not found. fatal: The remote end hung up unexpectedly I adde

git push -u origin master
ERROR: Repository not found.
fatal: The remote end hung up unexpectedly
git remote add origin [email protected]:account-name/repo-name.git
git remote rm origin
git remote add origin  https://USERNAME:[email protected]/username/reponame.git
git clone https://myusername:[email protected]/path_to/myRepo.git
ERROR: Repository not found.   
fatal: The remote end hung up unexpectedly
[remote "origin"]   
   url = [email protected]:alexagui/my_project.git  
   fetch = +refs/heads/*:refs/remotes/origin/*
git remote add origin [email protected]:alexagui/my_project.git  
git push -u origin master
ssh-add ~/.ssh/your_key
git remote rm origin
git remote add origin <remote url>
% git remote add ssh [email protected]:our-organisation/some-repository.git

% git fetch ssh
From github.com:our-organisation/some-repository
* [new branch]        MO_Adding_ECS_configs             -> ssh/MO_Adding_ECS_configs
* [new branch]        update_gems                       -> ssh/update_gems

% git push ssh     
ERROR: Repository not found.
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
git push https://youruser:[email protected]/user/reponame.git
$ git remote rm origin
$ git remote add origin [email protected]:<USER>/<REPO>.git
$ ssh-keygen -t rsa -b 4096 -C "[email protected]"
$ eval "$(ssh-agent -s)"
$ ssh-add ~/.ssh/id_rsa_github
$ git remote -v
origin  https://github.com/private-repo.git (fetch)
origin  https://github.com/private-repo.git (push)
$ git remote rm origin
$ git remote add origin [email protected]:private-repo.git
$ git remote -v
origin  [email protected]:private-repo.git (fetch)
origin  [email protected]:private-repo.git (push)
git remote add origin https://github.com/YOUR_USER/your-repo.git
git push -u origin master
   git pull https://myusername:[email protected]/path_to/myRepo.git
git remote set-url origin https://<YOUR_USER_NAME_HERE>@github.com/<YOUR_USER_NAME_HERE>/<REPO>.git
git clone https://<YOUR_USER_NAME_HERE>@github.com/<YOUR_USER_NAME_HERE>/<REPO>.git    
ssh -T [email protected]
ERROR: Repository not found.
ssh -T [email protected]
Hi <github_account_name>! You've successfully authenticated, but GitHub does not provide shell access. I just had to give the access to fix the problem.
#check current github account
ssh -T [email protected]

#ensure the correct ssh key used with github
ssh-agent -s
ssh-add ~/.ssh/YOUR-GITHUB-KEY

#re-add the origin
git remote add origin [email protected]:YOUR-USER/YOUR-REPO.GIT
git push -u origin master
git remote rm origin
git remote add origin [email protected]:account-name/repo-name.git
git config --edit --system 
helper = manager 
git config --list --show-origin

Git Clone — Repository not found

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 …

git clone <url>
$ GIT_CURL_VERBOSE=1 git clone https://github.com/YOUR-USERNAME/YOUR-REPOSITORY
$ echo <the key> | base64 --decode
https://github.com/user/repo2.git if you're using HTTPS
[email protected]:user/repo2.git if you're using SSH
git clone https://username:[email protected]/NAME/repo.git 
git credential-osxkeychain erase
host=github.com
protocol=https
git clone https://[email protected]/name/repo.git
git clone https://<USERNAME>:<PASSWORD>@github.com/<USERNAME>/<REPO_NAME>.git
git clone https://github.com/<USERNAME>/<REPO_NAME>.git
git clone https://<Token>@github.com/<USERNAME>/<REPO_NAME>.git
sudo su
git config --system --unset credential.helper
                             add your username
                                |-------|
$ git clone --recursive https://[email protected]/kmario23/repo-name.git
git remote rm origin
git remote add origin url
git config --global --unset credential.helper
git clone https://<repository>
git clone https://<USERNAME>@github.com/<REPONAME>/repo.git
export GIT_SSH_COMMAND="ssh -o StrictHostKeyChecking=no -o User=git -i ~/.ssh/ssh_key_for_repo"

git clone [email protected]:user/repo.git

Fatal: repository ……. not found

Teams. Q&A for work. Connect and share knowledge within a single location that is structured and easy to search. Learn more

git remote add origin https://github.com/ni8mr/Local-Weather-App/tree/gh-pages
fatal: repository 'https://github.com/ni8mr/Local-Weather-App/tree/gh-pages.git/' not found

remote: Repository not found (only on VSCode)
#3109

Steps to Reproduce: Create a private repository on Github Clone it Commit any change and push it I always get this error message: remote: Repository not found. fatal

cd /path/to/your/repo
nano .git/config
[remote "origin"]
	url = https://github.com/username/repo.git
[remote "origin"]
	url = https://<username>:<personalToken>@github.com/username/repo.git

Next Lesson PHP Tutorial

Понравилась статья? Поделить с друзьями:

Читайте также:

  • Git error unable to create file
  • Git error ssl certificate
  • Git error setting certificate verify locations cafile
  • Git error pathspec origin did not match any file s known to git
  • Git error path is unmerged

  • 0 0 голоса
    Рейтинг статьи
    Подписаться
    Уведомить о
    guest

    0 комментариев
    Старые
    Новые Популярные
    Межтекстовые Отзывы
    Посмотреть все комментарии