1
我是使用Nginx(不是Apache)通过http建立Git存储库的新手 我发现this guide,它似乎是一个非常简单的解决方案。未能通过Nginx通过http代理推送对git存储库的更改
我能够创建一个存储库并使用git clone
命令,但是当我尝试更改推到远程存储库中,我得到了下面的客户端消息
#git push origin master
XML error: not well-formed (invalid token)
error: no DAV locking support on http://192.168.80.128/git/it-knowledge.git/
fatal: git-http-push failed
谁能帮我找出什么错误我制作 ? 关于DAV锁定支持,我搜索并查看了有关DAV锁定文件的一些线程,是否有任何Nginx上的等效配置,以便成功推送更改?
下面是git的路径我nginx的配置文件,我的Nginx已经安装了--with-http_dav_module
选项
server {
listen 80;
server_name 192.168.80.128;
client_body_temp_path /tmp/client_temp;
location ~ /git(/.*) {
dav_methods PUT DELETE MKCOL COPY MOVE;
create_full_put_path on;
dav_access user:rw group:rw all:rw;
autoindex on;
client_max_body_size 10G;
fastcgi_pass localhost:9000;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME /usr/libexec/git-core/git-http-backend;
fastcgi_param GIT_HTTP_EXPORT_ALL "";
fastcgi_param GIT_PROJECT_ROOT /srv/git;
fastcgi_param PATH_INFO $1;
}
}