How-to setup an empty remote repository?
- From
Wink Saville <wink@saville.com>
- Date
- Aug 25, 2007, 21:00 UTC
- Message-ID
- <d4cf37a60708251400t17b0a097t91f77cbb4e996810@mail.gmail.com>
Hello,
I thought I'd try to setup a shared "empty" remote repository and then clone it and then push the initial commit from another maching. This failed as shown below:
$ cd ~/git-repos
$ mkdir test.git
$ cd test.git
$ git --bare init --shared
Initialized empty shared Git repository in /home/wink/git-repos/test.git/
$ git-daemon --reuseaddr --verbose --base-path=/home/wink/git-repos \
--export-all --enable=receive-packOn my other machine:
$ git clone git://192.168.0.8/test.git Initialized empty Git repository in /home/wink/prgs/test/.git/ fatal: no matching remote head fetch-pack from 'git://192.168.0.8/test.git' failed. $
And the remote machine responded:
[27299] Connection from 192.168.0.133:56710 [27299] Extended attributes (18 bytes) exist <host=192.168.0.8> [27299] Request upload-pack for '/test.git' [27299] Disconnected
In the instructions I followed for setting up a remote repository, http://www.kernel.org/pub/software/scm/git/docs/cvs-migration.html, it uses an existing repository. So is it true you can't clone an empty remote repository, or did I do something wrong?
I'm using : $ git --version git version 1.5.3.rc6.23.g0058
Note, my reason for using the shared remote repository is to make it simple and easy to backup my repository on a second machine and it seemed reasonable to try a an empty repository.
Cheers,
Wink Saville