克隆GitHub存储库时SourceTree出现问题 [英] Issue with SourceTree while cloning a GitHub repository
问题描述
我知道这里已经发布了类似的问题,但是我认为我的情况有些不同.这就是我所拥有的.
I know that similar question is already posted here, however I think that my scenario is a bit different. Here is what I have.
我下载并安装了SourceTree软件的最新正式版本.另外,我有GitHub帐户,该帐户具有克隆和推送存储库的权限.为了管理本地副本,我需要克隆在线版本.这是我要采取的步骤:
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:
- 启动SourceTree并导航到文件->克隆/新建...
- 在打开的窗口中,粘贴 HTTPS克隆URL .登录GitHub帐户后,我从浏览器中复制了它,因此链接是正确的.
-
嵌套步骤是指定要在其中复制存储库的本地文件夹.但是,当我单击输入目标路径时,窗口会显示错误:
- Start the SourceTree and navigate to File -> Clone / New ...
- 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.
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:
这不是有效的源路径/URL
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
或者,详细信息可能为空. SourceTree不会告诉我错误的原因或其他原因.
Or, the Details may be empty. The SourceTree does not tell me the reason for the error or anything else.
我试图重新安装SourceTree,但错误仍然存在.我向GitHub存储库的管理部门询问了其他任何权限,但我的帐户拥有所有这些权限.我可以使用终端控制台将更改推送到在线存储库,但是我想使用UI(SourceTree提供)来管理和比较代码中的更改.
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.
我认为我没有尝试过的方法是使用另一个GtHub帐户克隆存储库.但是我不想这样做,因为我需要代表我对存储库进行任何更改.
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
可能的原因:
- 代理设置(如在此处)
- proxy settings (as in this thread)
- setup steps, with Git disabled (as in here)
当SourceTree第一次启动时,我跳过了设置Git&的步骤.向导中的Mercurial.然后,我重新运行该向导,并选择下载并安装嵌入式软件包.
但是似乎安装这些功能实际上并没有启用它们-在Tools -> Options
对话框中,它们都被禁用了!
启用Mercurial(在您的情况下为Git)可以使克隆对话框正确识别存储库.
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 theTools -> Options
dialogue they were both disabled!
Enabling Mercurial (or Git in your case) allowed the clone dialogue to correctly identify the repo.
这篇关于克隆GitHub存储库时SourceTree出现问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!