3

I have a Linux server with Git and Gitolite. Until now, always works fine, but since yesterday I have a problem. I can connect and pull my repos but when I push I have these types of errors :

remote: Empty compile time value given to use lib at hooks/update line 6
remote: Use of uninitialized value in require at hooks/update line 7.
remote: Can't locate Gitolite/Hooks/Update.pm in @INC (@INC contains:  /etc/perl /usr/local/lib/perl/5.10.1 /usr/local/share/perl/5.10.1 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl .) at hooks/update line 7.
remote: BEGIN failed--compilation aborted at hooks/update line 7.
remote: error: hook declined to update refs/heads/master
To git@myhost.com:/home/git/repositories/gitolite-admin.git
! [remote rejected] master -> master (hook declined)
error: failed to push some refs to 'git@myhost.com:/home/git/repositories/gitolite-admin.git'

I'm lost... Can you help me please ? Thanks

Bob
  • 31
  • 1
  • 2

2 Answers2

1

The "Empty compile time value" is typical of an url which bypasses gitolite.

You used:

git@myhost.com:/home/git/repositories/gitolite-admin.git

But you should have used:

git@myhost.com:gitolite-admin

See "git, gitolite error push" for more.

Steve
  • 6,618
  • 3
  • 44
  • 42
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • Yes but when I use git@myhost.com:gitolite-admin I have an error. Git say me that the repository gitolite-admin doesn't exist... – Bob May 29 '13 at 21:47
  • @Bob that means your installation isn't properly done: `ssh git@myhost.com` should return a gitolite message. Re-do your installation, making sure the `gitolite` script is in the `PATH` as exposed by your `sshd` on `myhost.com`. – VonC May 30 '13 at 05:10
0

Probably the issue was with cloning the repository using "http uri" of repo. If so following solution may resolve the issue.

edit .git/config that exists in project's root directory. Look for remote origin section.

[remote "origin"]
    fetch = +refs/heads/*:refs/remotes/origin/*
    url = http://myhost.com/home/git/repositories/gitolite-admin.git

Then replace url field in the config file with ssh url git@myhost.com:/home/git/repositories/gitolite-admin.git

Then try to push.

Gergo Erdosi
  • 40,904
  • 21
  • 118
  • 94
Sagar MS
  • 1
  • 1