克隆 GitHub 存储库时 SourceTree 出现问题 [英] Issue with SourceTree while cloning a GitHub repository

查看:47
本文介绍了克隆 GitHub 存储库时 SourceTree 出现问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道这里已经发布了类似的问题,但是我认为我的情况有点不同.这是我所拥有的.

我下载并安装了SourceTree软件的最新官方版本.此外,我有 GitHub 帐户,有权克隆和推送存储库.为了管理本地副本,我需要克隆在线版本.以下是我采取的步骤:

  1. 启动 SourceTree 并导航到 File -> Clone/New ...
  2. 在打开的窗口中粘贴HTTPS 克隆 URL.我是登录GitHub账号后从浏览器复制的,所以链接是正确的.
  3. 嵌套步骤是指定将复制存储库的本地文件夹.但是当我点击进入目标路径时,窗口显示错误:

    <块引用>

    这不是有效的源路径/网址

    点击错误可能会给出详细信息:

    <块引用>

    remote:未找到存储库.致命:未找到存储库https://github.com/org/repo.git/"远程:未找到存储库.致命:未找到存储库https://github.com/org/repo.git/"

或者,详细信息可能为空.SourceTree 没有告诉我错误的原因或其他任何事情.

我尝试重新安装 SourceTree,但错误仍然存​​在.我向 GitHub 存储库的管理部门询问了任何其他权限,但我的帐户拥有所有权限.我可以使用终端控制台将更改推送到在线存储库,但我想使用 UI(SourceTree 提供的)来管理和比较代码中的更改.

有人认为我没有尝试使用另一个 GtHub 帐户克隆存储库.但我不想这样做,因为我需要代表我提交对存储库的任何更改.

有人知道如何修复或解决此错误吗?

解决方案

确切的错误消息是(如)

  • 设置步骤,禁用 Git(如 在这里)<块引用>

    当 SourceTree 第一次启动时,我跳过了设置 Git &向导中的 Mercurial.然后我重新运行向导并选择下载并安装嵌入式软件包.
    但似乎安装那些并没有真正启用它们 - 在 Tools ->选项对话他们都被禁用了!
    启用 Mercurial(或您的情况下的 Git)允许克隆对话正确识别存储库.

  • 凭据问题(如在这里,来自我的旧答案)
  • I know that similar question is already posted here, however I think that my scenario is a bit different. Here is what I have.

    I downloaded and installed the latest official version of the SourceTree software. Also, I have GitHub account with permissions to clone and push the repository. In order to manage a local copy I need to clone the on-line version. Here are the steps that I take:

    1. Start the SourceTree and navigate to File -> Clone / New ...
    2. In the opened window I paste the HTTPS clone URL. I copied it from the browser after I logged-in my GitHub account, so the link is correct.
    3. The nest step is to specify a local folder where the repository will be copied. But when I click to enter Destination Path, the window shows an error:

      This is not a valid source path / URL

      clicking the error may give the details:

      remote: Repository not found.
      fatal: repository 'https://github.com/org/repo.git/' not found
      remote: Repository not found.
      fatal: repository 'https://github.com/org/repo.git/' not found
      

    Or, the Details may be empty. The SourceTree does not tell me the reason for the error or anything else.

    I tried to re-install the SourceTree but the error still exists. I asked the Administration of the GitHub repository for any other permissions but my account has all of them. I am able to push changes to the online repository using the Terminal console, but I would like to use UI (that SourceTree provides) to manage and compare changes in the code.

    One think I did not try is to Clone the repository using another GtHub account. But I don't want to do that because I need to commit any changes to the repository on my behalf.

    Does anybody know how can this error be fixed or worked around?

    解决方案

    The exact error message is (as illustrated here):

     This is not a valid source path / URL
    

    Possible cause:

    • proxy settings (as in this thread)
    • setup steps, with Git disabled (as in here)

      When SourceTree started for the first time, I skipped setting up Git & Mercurial in the wizard. Then I reran the wizard and chose to download and install the embedded packages.
      But it seems installing those didn't actually enable them - in the Tools -> Options dialogue they were both disabled!
      Enabling Mercurial (or Git in your case) allowed the clone dialogue to correctly identify the repo.

    • credential issues (as in here, from my old answwer)

    这篇关于克隆 GitHub 存储库时 SourceTree 出现问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

    查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆