i am a little bit lost with this issue, let me explain you my problem: I want to setup a git repository, three of four users will contribute, so they need to download the code and shall be able to upload their changes to the server or update their branch with the latest modifications.

So, i setup a linux machine, install git, setup the repository, then add the users in order to enable the acces throught ssh.

Now my question is, What's next?, the git documentation is a little bit confusing, i.e. when i try from a dummy user account to clone the repository i got:

xxx@xxx-desktop:~/Documentos/git/test$ git clone -v ssh://xxx@
Initialized empty Git repository in /home/xxx/Documentos/git/test/pub/.git/
xxx@'s password: 
fatal: '/pub.git' does not appear to be a git repository
fatal: The remote end hung up unexpectedly

is that a problem of privileges? need any special configuration?

i want to avoid using git-daemon or gitosis, sorry, maybe my question sound silly but git is powerfull but i admit not so user friendly.

Thanks Br


You should start with this error:

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

Git doesn't think this is a git repository.

So, it's very likely that the path to the repository is incorrect in the clone command.

Is the path to your repository on the server in the clone command correct?

According to your command, the repository is in the server's / (root) directory (e.g. /pub.git)

You need to specify the full path to the repository on the server.

If the repository is in a user's home directory then you'd have to include those directories in the command also:

$git clone -v ssh://xxx@


$git clone -v ssh://xxx@
  • yes, i am quite sure the path is fine, if i do the same with my own user (the one that orinally has created the repository) then cloning is woking fine...
    – Daniel M.
    Mar 30 '10 at 20:20
  • thanks for your reply. But i guess the problem it is related with user accounts. now i follow another strategy, i have created git user, that will be shared by all integrators. then i created in the central repository one bare repos: git init --bare then i copy in this folder the ssh keys from the users (generated by ssh-keygen), and commit and modify files, then i push the modifications and seems that is working fine, but, i dont know if this is the best way to proceed....
    – Daniel M.
    Mar 30 '10 at 20:44
  • Seems a good way to me. This limits the security concerns to one user that has access to SSH. Also, unlike svn, git manages the user commits using the author specified by the actual author of the commit. FYI this is the same way that github.com does it.
    – Josiah
    Mar 30 '10 at 21:04
  • ok. then i will go with that. by the way, i am worried about this bare repository, which are the differences between this kind of repository and the regular one?, i should take any special measure with this? thanks
    – Daniel M.
    Mar 30 '10 at 21:17
  • 1
    The only difference is that a bare repository doesn't have a working directory. So, you can safely push to it. You wouldn't want to use a non-bare repository for a repository you're sharing.
    – jmohr
    Mar 30 '10 at 21:24

Better even than gitosis is gitolite, which is newer and more flexible. I wrote a blog post about it not long ago: http://colonelpanic.net/2011/01/git-and-gitolite-nirvana/


gitosis-admin is the best way to get rolling with serving git, IMO. You install the software, setup a "git" user, put each user's SSH public key into the config file, and you're done.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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