0

I created a remote Git repository and now I'm trying to clone it onto a different computer using Sourcetree. However, every time I type something into the "Source Path/URL" field, it gives me an error that says "This is not a valid source path/URL." This is what I've tried so far:

  • "git://12.345.678.90/"
  • "git://12.345.678.90/.git/"
  • "http://12.345.678.90/.git/"
  • "http://12.345.678.90/"
  • "ftp://12.345.678.90/"
  • "ftp://12.345.678.90/.git/"
  • "rsync://12.345.678.90/"
  • "rsync://12.345.678.90/.git/"

I've been using the Git documentation and stuff I've found by searching google. One thing I've noticed is that a lot of people's clone URLs look something similar to one of these:

  • 12.345.678.90/path/to/repo.git
  • ssh://12.345.678.90/path/to/repo.git

The server that the master repository lives on does not support SSH. Also, the repository is located in the website's root folder (which is not the root folder of the server.) Another thing is that my repository doesn't have a name. When I look at it in the file explorer (it's a Windows server), it's merely listed as ".git".

Note 1: All of the URLs I used, I used without quotes. When I first typed this out, it automatically converted half of them into links.

Note 2: For the sake of privacy, I've used a placeholder IP address in place of the real one.

jaypea07
  • 53
  • 1
  • 8
  • What on 12.345.679.90 to is serving the repo? – jthill Nov 29 '12 at 17:22
  • @jthill I've pretty new to git and I'm not quite sure what you mean. I installed git on 12.345.678.90 and did a `git init` and `git add .` inside my project folder. – jaypea07 Nov 29 '12 at 18:02
  • Then that's your problem. There has to be some active server running on that host. The simplest to implement is undoubtedly [the built-in git daemon](http://www.kernel.org/pub/software/scm/git/docs/git-daemon.html), depending on who controls that box it may be enough for you. – jthill Nov 30 '12 at 00:35

1 Answers1

0

Since your web server likely isn't setup to provide access using git's smart HTTP protocol, git will need to use the older, slower dumb HTTP protocol. This also means that you'll need run git update-server-info on the repository after every update to it for those updates to be available to clients. Not doing that for the first time could be the reason that neither of your http URLs worked.

I'd also advise giving the repository a name, rename the .git directory to something.git. At that point you should be able to use http://12.345.678.90/something to clone the repository. Having a repository without a name is quite unusual, and is likely to result in confusion. This will also make it easier to add other repositories in the future if that is ever desired.

qqx
  • 18,947
  • 4
  • 64
  • 68