Gitlist 错误:文件名、目录名或卷标语法不正确

时间:2020-12-21 01:30:33

标签: gitlist

我是第一次使用 gitlist,对它有点陌生,但我仍然不是 git 中的佼佼者。我一直在尝试设置 gitlist,但出现此错误: Oops!The filename, directory name, or volume label syntax is incorrect. 有没有办法解决这个问题? 我的 config.ini 文件:

[git]
; ; client = '/usr/bin/git' ; Your git executable path
default_branch = 'main' ; Default branch when HEAD is detached
; ; repositories[] = '/repos/' ; Path to your repositories
;                                            ; If you wish to add more repositories, just add a new line

; WINDOWS USERS
client = '"C:\Program Files\Git\bin\git.exe"' ; Your git executable path
repositories[] = 'C:\xampp\htdocs\gitlist\repos' ; Path to your repositories

; You can hide repositories from GitList, just copy this for each repository you want to hide or add a regex (including delimiters), eg. hidden[] = '/(.+)\.git/'
; hidden[] = '/home/git/repositories/BetaTest'

[app]
debug = false
cache = true
theme = "default"
title = "html title"

[clone_button]
; ssh remote
show_ssh_remote = false ; display remote URL for SSH
ssh_host = '' ; host to use for cloning via HTTP (default: none => uses gitlist web host)
ssh_url_subdir = '' ; if cloning via SSH is triggered using special dir (e.g. ssh://example.com/git/repo.git)
                ; has to end with trailing slash
ssh_port = '' ; port to use for cloning via SSH (default: 22 => standard ssh port)
ssh_user = 'git' ; user to use for cloning via SSH
ssh_user_dynamic = false ; when enabled, ssh_user is set to $_SERVER['PHP_AUTH_USER']

; http remote
show_http_remote = false ; display remote URL for HTTP
http_host = '' ; host to use for cloning via HTTP (default: none => uses gitlist web host)
use_https = true ; generate URL with https://
http_url_subdir = 'git/' ; if cloning via HTTP is triggered using virtual dir (e.g. https://example.com/git/repo.git)
                    ; has to end with trailing slash
http_user = '' ; user to use for cloning via HTTP (default: none)
http_user_dynamic = false ; when enabled, http_user is set to $_SERVER['PHP_AUTH_USER']

; If you need to specify custom filetypes for certain extensions, do this here
[filetypes]
; extension = type
; dist = xml

; If you need to set file types as binary or not, do this here
[binary_filetypes]
; extension = true
; svh = false
; map = true

; set the timezone
[date]
timezone = UTC
format = 'd/m/Y H:i:s'

; custom avatar service
[avatar]
;url = '//gravatar.com/avatar/'
;query[] = 'd=identicon'

这是文件夹结构:

├── gitlist/
|   ├── the other stuff
│   └── repos/
|       └── test/
|           └── README.md

repo 名为 test,它位于 repos/ 文件夹中。

1 个答案:

答案 0 :(得分:0)

我通过去掉客户端变量中的两个双引号来解决这个问题: 之前:

client = '"C:\Program Files\Git\bin\git.exe"' ; Your git executable path

之后:

client = 'C:\Program Files\Git\bin\git.exe' ; Your git executable path