我第一次尝试使用 VS Clone 将 Git 存储库下载到 Visual Studio 2019。我正在得到
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
该文件夹确实存在,任何人都可以验证。我从 Visual Studio 之外的 Web 浏览器登录到 Git。 Visual Studio Git 选项有我正确的 Git 用户名和电子邮件。
我可能做错了什么?正如我所说,我是 Git 新手,所以这可能是显而易见的事情。
清晰的凭据解决了我的问题,感谢 Kayla Ngan 提出了解决方案
在 Windows 搜索中,输入“凭据管理器”。选择“Windows 凭据”,然后清除特定“git:{URL}”的凭据。然后再次尝试克隆。
删除所有 azure、git、github、VisualStudio、vs code “Windows 凭据”。
我的主要浏览器 Chrome 为我的个人帐户存储了旧凭据。因此 VS 使用这些帐户而不是我的工作帐户进行身份验证。从 Google 密码管理器中删除旧的 github 凭据。