I am running Ubuntu 12.04 and created a git server and gave some users access to one repos I created. I have trouble to download the repos using open SSH through command line, no putty nothing.

I am using this command to download the repos called training :

ssh://username@xx.xx.xx.xx:22/srv/git/training.git and I tried a lot like

ssh://username@xx.xx.xx.xx:22/srv/git/training.git training   

Using this tutorial : ted felix git server

The error I get is this :

fatal: '/srv/git/training/training' does not appear to be a git repository
fatal: Could not read from remote repository.

My suggestion is, that my repos is not setup correctly.

or I made a mistake with this ssh keys. Any Ideas? I can provide all information you need, just let me know what's missing.

EDIT : It works using the command line (git bash) ... intereseting

Output as requested of folder permissions

XXXXXX@DefaultEnvironment:~$ ls -la /svr/git/training
total 16
drwxr-sr-x 3 root      git 4096 Feb  4 12:55 .
drwxrwsr-x 4 XXXXXX    git 4096 Feb  4 12:40 ..
-rw-r--r-- 1 root      git    9 Feb  4 12:55 catchmeifyoucan
drwxrwsr-x 8 root      git 4096 Feb  4 12:56 .git
  • Can you post output of ls -la /srv/git/training.git? – OrangeTux Feb 4 '14 at 14:22
  • sure, posted it. – Private Feb 4 '14 at 14:35

The git repo you've created isn't a bare repository. A bare repository is a repo without the working tree.

From git-scm

Now, you can set up an empty repository for them by running git init with the --bare option, which initializes the repository without a working directory:

You can create a bare repo with:

`git init --bare <project name>`

Transforming a normal repo into a bare repo is not that hard, you can your best answer on StackOverflow

| improve this answer | |
  • give that sir a prize or price? why not both !? Totally saved my ass, but I still don't know why I could clone it before through command line. – Private Feb 4 '14 at 19:07
  • I've had this problem a few years ago and I know how this problem kept me busy for a long times. – OrangeTux Feb 4 '14 at 20:20

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.