Joe's picture

First off, your redmine image is awesome.

now to my issue.  I have redmine running on virtual box.  I want to move my unsourced code into a new git repository.  I've followed the steps on this link http://www.turnkeylinux.org/forum/support/20100914/how-setup-git from Dan's 2nd post.

 

cd /srv/repos/git

git init test

cd /test

touch readme

git add .

git commit -m "Inital Commit"

 

When i go into my redmine project, i have sucessfuly setup the project to use the respository @ /srv/repos/git/test/.git and my inital commit shows up fine.

I then followed the link @ http://www.turnkeylinux.org/node/1633

 

 

ln -s /srv/repos/git/test/.git /var/cache/git/test.git

now the issue is when on my windows machine running cygwin and run the following command:

git clone git://192.168.1.169/git/test rc
I receive
	$ git clone git://192.168.1.169/git/test rc
Cloning into rc...
fatal: The remote end hung up unexpectedly Any help?
Forum: 
Dan Robertson's picture

I bet it is an authentication issue.  One way around is to just use SSH.

git clone ssh://root:password@192.168.1.169/git/test
Joe's picture

So I gave it another try doing both methods git:// and ssh://

 

 

sysop@Richard_Bandit ~/git
Cloning into test...
The authenticity of host '192.168.1.169 (192.168.1.169)' can't be established.
RSA key fingerprint is 14:85:91:43:cc:3c:84:ce:e9:e1:b7:54:36:07:90:4d.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.1.169' (RSA) to the list of known hosts.
root:Bgkxsjdf32@192.168.1.169's password:
fatal: '/git/test' does not appear to be a git repository
fatal: The remote end hung up unexpectedly
 
sysop@Richard_Bandit ~/git
$ git clone git://192.168.1.169/git/test
Cloning into test...
fatal: The remote end hung up unexpectedly
 
sysop@Richard_Bandit ~/git
Dan Robertson's picture

Sorry, I do everything with public/private key pairs so the syntax I gave you may be wrong.  Try doing so without the password:

git clone ssh://root@192.168.1.169/git/test

The message it gave you looks like it will then prompt you for your password.  It also looks like you posted your password, so you may want to change it.

Joe's picture

Its a throw away password if i did, but i believe i canceled it out with <Password>

even without the password it still says "'/git/test' does not appear to be a repository'

I did another test using the helloworld git repository.  I can download the helloworld project using git:// but using ssh:// it gives me the 'not a repository' error again.

 

 

sysop@Richard_Bandit ~/git
Cloning into test...
root@192.168.1.169's password:
fatal: '/git/test' does not appear to be a git repository
fatal: The remote end hung up unexpectedly
 
sysop@Richard_Bandit ~/git
Cloning into hw...
root@192.168.1.169's password:
fatal: '/git/helloworld' does not appear to be a git repository
fatal: The remote end hung up unexpectedly
 
sysop@Richard_Bandit ~/git
$ git clone git://192.168.1.169/git/helloworld hw
Cloning into hw...
remote: Counting objects: 7, done.
remote: Compressing objects: 100% (6/6), done.
remote: Total 7 (delta 0), reused 0 (delta 0)
Receiving objects: 100% (7/7), done.
 
Dan Robertson's picture

I think that if you use ssh, you may need to specify the local path to the repo. So instead of //server/git/repo you would need //server/srv/repos/git/repo.

Does this work for you? :

git clone ssh://root@192.168.1.169/srv/repos/git/test

As I said, I always use ssh and public keys.  So if anyone has tips on making all this work using git://, I would appreciate the knowledge as well.

Joe's picture

That worked!  

 

My question now is why does git://192.168.1.169/git/helloworld work while git://192.168.1.169/git/test does not?

Dan Robertson's picture

It could be due to different file permissions and ownership on the two directories.

Joe's picture

Do you know what i should look at to fix that or some keywords to google?

Dan Robertson's picture

Use

cd /srv/repos/git
ls -l

to show you the permissions, owner, and group for the files.  I would look at the group of the helloworld directory and (recursively) modify the group of the test directory to match.

You can check out https://help.ubuntu.com/community/FilePermissions for more information.

Joe's picture

Does this look legit.  ignore releasecatcher, that's the actual repository i want but test repo is still valid.

 

root@redmine ~# cd /srv/repos/git ls -l
root@redmine repos/git# ls -l
total 16
drwxr-xr-x 3 root root 4096 Oct 19 08:06 helloworld
lrwxrwxrwx 1 root root   14 Dec 27 12:03 public -> /var/cache/git
drwxr-xr-x 3 root root 4096 Dec 29 14:24 releasecatcher
drwxr-xr-x 3 root root 4096 Dec 29 15:11 temp
drwxr-xr-x 3 root root 4096 Dec 29 15:26 test
 

 

 
root@redmine repos/git# ls -lR
.:
total 16
drwxr-xr-x 3 root root 4096 Oct 19 08:06 helloworld
lrwxrwxrwx 1 root root   14 Dec 27 12:03 public -> /var/cache/git
drwxr-xr-x 3 root root 4096 Dec 29 14:24 releasecatcher
drwxr-xr-x 3 root root 4096 Dec 29 15:11 temp
drwxr-xr-x 3 root root 4096 Dec 29 15:26 test
 
./helloworld:
total 8
-rw-r--r-- 1 root root 45 Oct 19 08:06 README
-rwxr-xr-x 1 root root 95 Oct 19 08:06 helloworld.py
 
./releasecatcher:
total 0
-rw-r--r-- 1 root root 0 Dec 29 14:24 readme
 
./temp:
total 4
drwxr-xr-x 3 root root 4096 Dec 29 15:11 releasecatcher
 
./temp/releasecatcher:
total 4
-rw-r--r-- 1 root root 5 Dec 29 15:12 readme
 
./test:
total 0
-rw-r--r-- 1 root root 0 Dec 29 15:26 git-daemon-export-ok
-rw-r--r-- 1 root root 0 Dec 29 15:23 readme
 
root@redmine repos/git# cd /var/cache/git/
root@redmine cache/git# ls -lR
.:
total 0
lrwxrwxrwx 1 root root 30 Dec 27 12:03 helloworld.git -> /srv/repos/git/helloworld/.git
lrwxrwxrwx 1 root root 34 Dec 29 14:16 releasecatcher.git -> /srv/repos/git/releasecatcher/.git
lrwxrwxrwx 1 root root 23 Dec 29 15:25 test.git -> /srv/repos/git/test.git
 
 
Dan Robertson's picture

Everything is owned by root, so it probably doesn't have to do with file permissions.  Sorry, but I don't know the answer to this and don't currently have a system set up to test with.

phillip bailey's picture

I guess is missing the git-daemon-export-ok, so you need to got into the .git directory ad run

 

touch git-daemon-export-ok

And everything must run smoothly.

 

Phillip


 

Add new comment