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 /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 @ /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
Replies (12)
authentication issue
Reply 1So I gave it another try
Reply 2So I gave it another try doing both methods git:// and ssh://
sysop@Richard_Bandit ~/git$ git clone ssh://root:<Password>@192.168.1.169/git/testCloning 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)? yesWarning: 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 repositoryfatal: The remote end hung up unexpectedlysysop@Richard_Bandit ~/git$ git clone git://192.168.1.169/git/testCloning into test...fatal: The remote end hung up unexpectedlysysop@Richard_Bandit ~/git
Its a throw away password if
Reply 3Its 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$ git clone ssh://root@192.168.1.169/git/testCloning into test...root@192.168.1.169's password:fatal: '/git/test' does not appear to be a git repositoryfatal: The remote end hung up unexpectedlysysop@Richard_Bandit ~/git$ git clone ssh://root@192.168.1.169/git/helloworld hwCloning into hw...root@192.168.1.169's password:fatal: '/git/helloworld' does not appear to be a git repositoryfatal: The remote end hung up unexpectedlysysop@Richard_Bandit ~/git$ git clone git://192.168.1.169/git/helloworld hwCloning 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.
My syntax may be wrong.
Reply 4Sorry, 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.
That worked!
Reply 5That 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?
Different paths
Reply 6I 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.
File permissions
Reply 7It could be due to different file permissions and ownership on the two directories.
Do you know what i should
Reply 8Do you know what i should look at to fix that or some keywords to google?
Use "ls -l" command
Reply 9Use
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.
Does this look legit. ignore
Reply 10Does 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 -lroot@redmine repos/git# ls -ltotal 16drwxr-xr-x 3 root root 4096 Oct 19 08:06 helloworldlrwxrwxrwx 1 root root 14 Dec 27 12:03 public -> /var/cache/gitdrwxr-xr-x 3 root root 4096 Dec 29 14:24 releasecatcherdrwxr-xr-x 3 root root 4096 Dec 29 15:11 tempdrwxr-xr-x 3 root root 4096 Dec 29 15:26 test
root@redmine repos/git# ls -lR.:total 16drwxr-xr-x 3 root root 4096 Oct 19 08:06 helloworldlrwxrwxrwx 1 root root 14 Dec 27 12:03 public -> /var/cache/gitdrwxr-xr-x 3 root root 4096 Dec 29 14:24 releasecatcherdrwxr-xr-x 3 root root 4096 Dec 29 15:11 tempdrwxr-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 4drwxr-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 0lrwxrwxrwx 1 root root 30 Dec 27 12:03 helloworld.git -> /srv/repos/git/helloworld/.gitlrwxrwxrwx 1 root root 34 Dec 29 14:16 releasecatcher.git -> /srv/repos/git/releasecatcher/.gitlrwxrwxrwx 1 root root 23 Dec 29 15:25 test.git -> /srv/repos/git/test.git
Probably not file permissions
Reply 11I 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
Probably not file permissions
Reply 12Everything 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.
I bet it is an authentication issue. One way around is to just use SSH.