Visual Studio 2019 - 克隆 Git 失败并出现致命错误。未找到存储库

Cha*_*les 5 git visual-studio-2019

我第一次尝试使用 VS Clone 将 Git 存储库下载到 Visual\xc2\xa0Studio\xc2\xa02019。我正进入(状态

\n
Cloning into 'C:\\Users\\Charles\\Source\\Repos\\FingerprintGuide'...\nError encountered while cloning the remote repository: Git failed with a fatal error.\nrepository 'https://github.com/xamarin/monodroid-samples/tree/master/FingerprintGuide/' not found\n
Run Code Online (Sandbox Code Playgroud)\n

任何人都可以验证该文件夹确实存在。我从 Visual\xc2\xa0Studio 外部的 Web 浏览器登录到 Git。Visual\xc2\xa0Studio Git Options 有我正确的 Git 用户名和电子邮件。

\n

我可能做错了什么?正如我所说,我是 Git 新手,所以这可能是显而易见的事情。

\n

Eya*_*uri 5

清晰的凭据解决了我的问题,感谢 Kayla Ngan 提出了解决方案

在 Windows 搜索中,键入“凭据管理器”。选择“Windows 凭据”,然后清除特定“git:{URL}”的凭据。然后再次尝试克隆。

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


Ras*_*bel 3

您必须在 Visual\xc2\xa0Studio 中自定义一些设置才能正确克隆。

\n
    \n
  1. 在 Visual\xc2\xa0Studio 的起始页中继续,无需代码

    \n
  2. \n
  3. 转到 Visual\xc2\xa0Studio 中的 Git 菜单

    \n
  4. \n
  5. 前往设置

    \n
  6. \n
  7. 在左侧树视图中搜索源代码管理

    \n
  8. \n
  9. 选择Git 全局设置

    \n
  10. \n
  11. 然后进行如图所示的设置:

    \n

    Visual Studio 的 Git 设置

    \n
  12. \n
\n

然后再次尝试克隆。克隆之前,请删除要克隆到的本地计算机中的目标或将目标文件夹清空。

\n