当前位置: 动力学知识库 > 问答 > 编程问答 >

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.

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 saying: "This is not a valid path/URL" and a Details button next to the error.

But the problem is that the Details are 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?

Thank you for your time!

Happy holidays and Happy Happy new year.

网友答案:

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)
网友答案:

I had to uninstall and reinstall SourceTree before it would work. I think my antivirus (Comodo ) was blocking/sandboxing some stuff on the initial install so I disabled it for the reinstall.

网友答案:

May I also just add that I resolved this issue by installing Git through SourceTree from [SourceTree]>Tools>Options>Git.

As I'd been using mercurial exclusively on that system till then it had never been installed, and so was presenting the above described error when trying to clone.

Hopefully this helps someone with the same issue! If not, good luck!

网友答案:

I was facing the same issue with windows 10 and source tree. After bit research following solution worked for me. I needed to download or enable the git support in source tree.

Steps 1) Go to Tools -> Options -> Git -> Enable git support

That's it it resolved my issue. Happy coding :)

网友答案:

I was facing the same issue with windows 10 and source tree. After bit research following solution worked for me. I needed to download or enable the git support in source tree.

Steps 1) Go to Tools -> Options -> Git -> Enable git support

That's it it resolved my issue. Happy coding :)

分享给朋友:
您可能感兴趣的文章:
随机阅读: