Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to clone/pull a repository in another PC using Ubuntu Quantal. I have done this on Windows before but I don't know what is the problem on ubuntu. I tried these:

git clone file:////pc-name/repo/repository.git
git clone file:////
git clone file:////user:pass@pc-name/repo/repository.git
git clone smb://c-pc/repo/repository.git
git clone //

Always I got:

Cloning into 'intranet'...
fatal: '//c-pc/repo/repository.git' does not appear to be a git repository
fatal: The remote end hung up unexpectedly


fatal: repository '//' does not exist


  • The other PC has username and password
  • Is not networking issue, I can access and ping it.
  • I just installed git doing apt-get install git (dependencies installed)
  • I'm running git from the terminal (I'm not using git-shell)

What is causing this and how to fix this? Any help would be great!


I have cloned the repo on Windows using git clone // without problems. So, the repo is accessible and exist! Maybe the problem is due user credentials?

share|improve this question

closed as off-topic by sciurus, mdpc, Jenny D, Ward, Falcon Momot Jan 12 '14 at 22:17

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions must be relevant to professional system administration. Server Fault is dedicated to professional system and network administrators. End user and enthusiast questions are off-topic (contact your system administrator or hire a professional to help you out). Please see the Help Center for more information." – sciurus, mdpc, Jenny D, Ward, Falcon Momot
If this question can be reworded to fit the rules in the help center, please edit the question.

I'm not really sure if this question belong here, but I have seen similar questions on SF – Tomás Ramírez Jan 7 '13 at 20:51
up vote 9 down vote accepted

It depends on how you have your server configured to serve content.

If over ssh:

git clone user@

or if a webserver is providing the content (http or https)


or if available via a file path:

git clone file://path/to/repo

or if the server is running the git daemon:

git clone git://
share|improve this answer
On Windows, I'm cloning using git clone //, but I logged previously on the maching, so this is the file:// way? – Tomás Ramírez Jan 7 '13 at 21:16
useful answer, thanks! To clone a repo located at a Windows shared folder I used git clone file://\\\PC1\path-to-repo-dir – Ivan Ferrer Villa Oct 24 '14 at 17:19

The manual for git-clone says:

Git natively supports ssh, git, http, https, ftp, ftps, and rsync protocols

Note that SMB is not in the list.

When running git on Windows, the //host/path syntax works because the OS supports it natively - SMB remote paths can be used anywhere a local path can be used. That is not the case in unix, where SMB is an alien thing, and // is equivalent to / in the pathname resolution algorithm.

mount the remote filesystem, then you will have the ability to refer to it with a unix-style pathname that git (and every other tool on the system) understands.

For information on mounting smbfs:

share|improve this answer

This issue seems similar to Perhaps the administrative share helps alleviate the problem (e.g. //pc-name/c$/path/to/repo)

share|improve this answer
no, is the same case, but not the same problem, I read that thread before :/ and the repo directory is shared correctly – Tomás Ramírez Jan 7 '13 at 23:42

Not the answer you're looking for? Browse other questions tagged or ask your own question.