gitolite gitlist:无法将HEAD解析为有效的参考 [英] gitolite gitlist: Failed to resolve HEAD as a valid ref

查看:225
本文介绍了gitolite gitlist:无法将HEAD解析为有效的参考的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前在我的私人服务器上切换到gitolite + gitlist。
虽然gitolite工作正常,但gitlist和gitweb都没有。
在gitlist中,我可以看到testrepo和我自己的,gitlist告诉我

 糟糕!致命:无法将HEAD解析为有效的参考。 

该配置看起来有效......

  [git] 
client ='/ usr / bin / git';你的git可执行文件路径
repositories ='/ var / www / gitolite / repositories /';存储库的路径

;您可以从GitList中隐藏存储库,只需为要隐藏的每个存储库复制该文件
;隐藏[] ='/ var / www / projects / BetaTest'
hidden [] = /var/www/gitolite/repositories/gitolite-admin.git

[app]
debug = false

;如果您需要为某些扩展指定自定义文件类型,请在此执行
[filetypes]
;扩展=输入
; dist = xml

...以及存储库

  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

和HEAD

  cat HEAD 
ref:refs / heads / master

任何想法?

解决方案

我也遇到了这个问题。

在裸仓库repoName.git中可能有这样的文件:
-rw-r - r-- 1 git git 23 Sep 19 11:37 HEAD
与内容:
ref:refs / heads /主



但是,当我检查文件 repoName.git / refs / heads / master 时, code>它有这些权利
-rw ------- 1 git git 41 Mar 13 15:22 refs / heads / master



因此,我可以通过更改此文件的权限来解决此问题(实际上,我授予了更多权限,您可以尝试减少权限):



> chmod go + r repositories

'repositories'是gitolite的存储库目录。


I've currently switched to gitolite + gitlist on my private server. While gitolite works fine, gitlist and also gitweb don't. While in gitlist i can see the testrepo and my own, gitlist tells me

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

The config 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

... and also 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 the HEAD

cat HEAD
ref: refs/heads/master

Any Idea?

解决方案

I suffered from this problem, too.

In a bare repository "repoName.git" there is probably this file: -rw-r--r-- 1 git git 23 Sep 19 11:37 HEAD with the content: ref: refs/heads/master. Similar postings suggested to check the access rights for this file.

But when I examined the file repoName.git/refs/heads/master it 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 for this file too (actually I granted a little more, you can try to give less rights):

chmod go+r repositories

Where 'repositories' is the repositories directory of gitolite.

这篇关于gitolite gitlist:无法将HEAD解析为有效的参考的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆