Reputation: 509
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
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
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.
Upvotes: 6
Reputation: 9546
Remove all azure, git, github, VisualStudio, vs code "windows credential".
Watch this video : https://www.youtube.com/watch?v=Y6qLNgFt1EM
Upvotes: 1
Reputation: 3584
You have to customize some setting in Visual Studio to clone properly.
Continue without code in the start page of Visual Studio
Go to the Git menu in Visual Studio
Go to Settings
Search for source control in the left tree view
Select Git Global Settings
Then set the setting as shown:
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