【问题标题】:Visual Studio 2019 - Clone Git failed with a fatal error. Repository not foundVS 2019 克隆 Git 因致命错误而失败。未找到存储库
【发布时间】:2021-09-26 03:53:24
【问题描述】:

我第一次尝试使用 VS Clone 将 Git 存储库下载到 VS 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

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

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

【问题讨论】:

  • 你可以看看类似的问题:stackoverflow.com/questions/42667928/…
  • 谢谢。我尝试了那里详细介绍的 5 步程序。仍然出现同样的错误。
  • 我的天哪。那里有大约五十种不同的“试试这个/试试那个/删除 OpenSSL”的想法。可怜的用户应该怎么做?
  • 我认为那是因为您的 url 应该只是 https://github.com/xamarin/monodroid-samples
  • 为此,您应该根据您想要实现的目标进行浅层克隆或部分克隆(或两者兼而有之):github.blog/…

标签: git visual-studio-2019


【解决方案1】:

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

  1. 在 Visual Studio 的起始页中无代码继续
  2. 转到 Visual Studio 中的 GIT 菜单
  3. 进入设置
  4. 在左侧树视图中搜索源代码管理
  5. 选择 Git 全局设置
  6. 然后按照链接中的图片进行设置: Git Settings for visual studio

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

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2020-12-09
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-11-28
    • 2020-10-24
    相关资源
    最近更新 更多