I've been using SVN at work, but we've never been able to fully take cleanly integrate branching & merging as I'd like so with that, and the desire to allow remote developers to have a fully distributed VCS I thought I'd take a look at git.
I setup git and gitolite on a CentOS 6.3 server that we'll call nix2 and added a single repository with some content.
On my local workstation (Macbook Pro OSX 10.8) I was able to git clone
git@nix2.domain.com:admin.domain.com which I understand is the same as a svn checkout. I then added a files, committed and did a git push
Code:
MacBook-Pro:admin.domain.com jukas$ git push
Counting objects: 1191, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (1061/1061), done.
Writing objects: 100% (1190/1190), 1.58 MiB, done.
Total 1190 (delta 147), reused 0 (delta 0)
To git@nix2.domain.com:admin.domain.com
a8fdd1f..6a1ec21 master -> master
All good so far, then I ssh'd to my server nix2 and tried to 'checkout' this content in my /www/htdocs/ directory only to have the remote server tell me it isn't a git repository...
Code:
[root@nix2 htdocs]# git clone git@nix2.domain.com:admin.domain.com
Initialized empty Git repository in /www/htdocs/admin.domain.com/.git/
git@nix2.domain.com's password:
fatal: 'admin.domain.com' does not appear to be a git repository
fatal: The remote end hung up unexpectedly
So I went back to my Macbook, deleted the folder and re-did a git clone to test and it worked fine..
Code:
MacBook-Pro:sites jukas$ git clone git@nix2.domain.com:admin.domain.com
Cloning into 'admin.domain.com'...
remote: Counting objects: 1193, done.
remote: Compressing objects: 100% (915/915), done.
remote: Total 1193 (delta 147), reused 1190 (delta 147)
Receiving objects: 100% (1193/1193), 1.58 MiB | 1.32 MiB/s, done.
Resolving deltas: 100% (147/147), done.
No matter what I tried, I was unable to do a git clone on the remote server itself. This is trivial in svn, you juts create the dir and do a svn co svn+ssh://server/var/svn-repos/repo/trunk .
I've tried doing the git clone on the server itself as the following users root, git, jukas all with the same results. When I check /var/log/secure it just shows a ssh connection opening and closing.
I thought maybe this was a RTFM situation, but in reading the process seems pretty straightforward so I'm stumped what I'm doing wrong.
Any insight is much appreciated.