Gitolite gitlist: Failed to resolve HEAD as a valid ref

Currently, I have switched to gitolite + gitlist on my personal server. Although gitolit works fine, gitlist and gitweb do not. Although in gitlist I see testrepo and my own, gitlist tells me

Oops! fatal: Failed to resolve HEAD as a valid ref. 

The configuration looks valid ...

 [git] client = '/usr/bin/git' ; Your git executable path repositories = '/var/www/gitolite/repositories/' ; Path to your repositories ; You can hide repositories from GitList, just copy this for each repository you want to hide ; hidden[] = '/var/www/projects/BetaTest' hidden[] = /var/www/gitolite/repositories/gitolite-admin.git [app] debug = false ; If you need to specify custom filetypes for certain extensions, do this here [filetypes] ; extension = type ; dist = xml 

... as well as the repository

 drwxr-xr-x 7 git git 4096 Sep 23 11:53 . drwxr-xr-x 5 git git 4096 Sep 23 00:19 .. -rwxr-xr-x 1 git git 23 Sep 23 00:19 HEAD drwxr-xr-x 2 git git 4096 Sep 23 00:19 branches -rwxr-xr-x 1 git git 66 Sep 23 00:19 config -rwxr-xr-x 1 git git 386 Sep 24 17:27 gl-conf drwxr-xr-x 2 git git 4096 Sep 23 00:19 hooks drwxr-xr-x 2 git git 4096 Sep 23 00:19 info drwxr-xr-x 109 git git 4096 Sep 25 00:24 objects drwxr-xr-x 4 git git 4096 Sep 23 00:19 refs 

and HEAD

 cat HEAD ref: refs/heads/master 

Any idea?

+4
source share
2 answers

Check tags and branches.

If you have a tag called master , git clone git repo with the -b master option can work too! ( -b accepts a branch name or tag)

0
source

I also suffered from this problem.

This bare repoName.git repository probably contains this file: -rw-r--r-- 1 git git 23 Sep 19 11:37 HEAD with the contents: ref: refs/heads/master . Similar publications suggest checking permissions for this file.

But when I looked at the file repoName.git/refs/heads/master , he had these rights -rw------- 1 git git 41 Mar 13 15:22 refs/heads/master .

Therefore, I could solve this problem by changing the rights to this file (in fact, I gave a little more, you can try to give less rights):

chmod go+r repositories

Where "repositories" is the catalog of githolite repositories.

0
source

Source: https://habr.com/ru/post/1436058/


All Articles