【发布时间】:2012-09-25 04:48:04
【问题描述】:
我目前已在我的私人服务器上切换到 gitolite + gitlist。 虽然 gitolite 工作正常,但 gitlist 和 gitweb 却不行。 在 gitlist 中我可以看到 testrepo 和我自己的,gitlist 告诉我
Oops! fatal: Failed to resolve HEAD as a valid ref.
配置看起来有效...
[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
...还有存储库
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
和头
cat HEAD
ref: refs/heads/master
有什么想法吗?
【问题讨论】:
-
什么确切的命令(我想是 git clone)失败了?您使用的具体地址是什么?
-
HEAD和config不应该(通常)是可执行的。不过,如果这会导致问题,我会感到惊讶。 -
不,git clone、push 和 pull 工作正常,(正如我所说)gitolite 工作正常。但 gitlist 显示存储库,但不显示内容。出现错误消息“Oups!...”。我已将 HEAD 和 Config 的权限恢复正常,没有任何变化...
-
如果您可以访问您机器上的项目,您应该尝试检查位于服务器的
.git/refs/heads/master文件中的哈希值。这样你就可以知道你服务器上master的哈希指针是否有效。 -
我试图检查我本地机器上的 master 分支,比如 git@remoteserver:repository -b master 并且它有效(希望你的意思是,我是 git 的新手)