1

We have a new gitolite server where I work, and I'm having trouble push a repo to the server.

I cloned the conf file, added my repo, then pushed it back. After confirming that the empty repo is there I clone the repo to my computer. I get an error that says, warning you've cloned an empty repo. So to test this I add a README, and commit it. No problem. But when I try to push it back to the server with the change I get a fatal: The remote end hung up unexpectedly.

It may also be of note, but when I'm working in a repo, I have a little script for my prompt that tells me when the repo isn't pushed... this isn't present here.

Any help would be great. Thanks!

tshauck
  • 20,746
  • 8
  • 36
  • 36

1 Answers1

2

Make sure that:

  • your HOME environment variable is defined
  • your public key is in %HOME%/.ssh (or $HOME/.ssh on Unix)

The trick with gitolite is that the public key is named after your name.
Ie it is not named after the default public key name (id_rsa.pub)

In that case, you need an ssh config file to specify the name of the private (and public by extension) key:

$ vi ~/.ssh/config

host gitolite
     user git
     hostname yourgitserver.com
     identityfile ~/.ssh/mypubkey

Then change your remote:

git remote set-url orgin gitolite:your-project

And try to push. It should work then.

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250