Charles
Charles

Reputation: 509

Visual Studio 2019 - Clone Git failed with a fatal error. Repository not found

I am trying for the first time to download a Git repository to Visual Studio 2019 using VS Clone. I am getting

Cloning into 'C:\Users\Charles\Source\Repos\FingerprintGuide'...
Error encountered while cloning the remote repository: Git failed with a fatal error.
repository 'https://github.com/xamarin/monodroid-samples/tree/master/FingerprintGuide/' not found

The folder certainly exists as anyone can verify. I am signed into Git from a Web browser outside of Visual Studio. Visual Studio Git Options has my correct Git user name and e-mail.

What might I be doing wrong? As I say, I am new to Git, so it might be something obvious.

Upvotes: 5

Views: 30333

Answers (4)

DingoCC
DingoCC

Reputation: 159

My primary Browser Chrome had old credentials stored for my personal account. So VS authenticated using those, instead of my work account. Delete from Google Password Manager old github credentials.

Upvotes: 0

Eyad Takrouri
Eyad Takrouri

Reputation: 61

Clear credentials solve my problem, thanks for Kayla Ngan who proposed the solution

In the Windows search, type "Credential Manager". Choose "Windows Credentials", then clear the creds for the specific "git:{URL}". Then try cloning again.

ref: https://developercommunity.visualstudio.com/t/git-failed-with-a-fatal-error-repostiory-not-found/156101#T-N179991

Upvotes: 6

willingdev
willingdev

Reputation: 9546

Remove all azure, git, github, VisualStudio, vs code "windows credential".

Watch this video : https://www.youtube.com/watch?v=Y6qLNgFt1EM

Upvotes: 1

Rashedul.Rubel
Rashedul.Rubel

Reputation: 3584

You have to customize some setting in Visual Studio to clone properly.

  1. Continue without code in the start page of Visual Studio

  2. Go to the Git menu in Visual Studio

  3. Go to Settings

  4. Search for source control in the left tree view

  5. Select Git Global Settings

  6. Then set the setting as shown:

    Git settings for Visual Studio

And then try to clone again. Before cloning, delete the destination or make the destination folder empty in your local machine to which you are cloning into.

Upvotes: 3

Related Questions