Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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

git clone gituser@<server>:myRepo.git doesn't work, fails with the error message:

fatal: ''myRepo.git'' does not appear to be a git repository


We have a Windows 7 machine set up with Git Bash and Bitvise WinSSHd (on C:). The SSH server is set up to use <git dir>/bin/sh.exe --login as the shell, with the home directory set to /a/. I can SSH onto the server just fine, and it drops me into the Git Bash shell as expected, starting in the /a/ directory.

I have a bare repository at /a/myRepo.git (on the A: disk) which does everything it should, as long as we're doing it locally. I can git clone /a/myRepo.git, work on it, push and pull, no problems as long as it's local (or "local" over SSH). Furthermore, we set up the A: disk as a shared folder, and I can clone, push, and pull from a local network machine using \\<server>\myRepo.git.

When I try to clone remotely, however, I cannot figure out what combination of options will allow it to work: The obvious clone string doesn't work, putting an absolute pathname in either *nix-converted format (/a/myRepo.git and A:/myRepo.git) or Windows format (A:\\myRepo.git) fails with the same error, the permissions on the directory are set up to allow all users, and I've set git config core.sharedRepository all on the serving machine as well.

I had a suspicion of Git Bash's remapping of Windows drive letters into /<letter> format, but I tried creating another bare repository on C: and it gives me the same error message.

share|improve this question
  1. Read about supported by Git protocols and format of URLs
  2. Use correct, unambiguously interpreted URL for the repository: while you use SSH and URLS seems as SSH, it resembles more format of SCP. I.e - starting point in path part isn't $HOME, but root of your ssh-server

I'll expect ssh://gituser@<server>/~/myRepo.git have to work (formally, besides some possible additional unrelated to ssh problems)

share|improve this answer
The full string, including protocol and path name didn't work. Adding the protocol interprets things between : and / as a port. – harbichidian Mar 30 '13 at 4:17
@harbichidian - mea culpa, URL corrrected. used as reference – Lazy Badger Mar 30 '13 at 6:20
Tried .../~/myRepo.git, .../a/myRepo.git, and .../myRepo.git. None worked, all returned the same error with the host and initial slash stripped in the message (''~/myRepo.git'' does not appear...). – harbichidian Mar 30 '13 at 15:31

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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