Cannot push Git to remote repository with http/https

后端 未结 8 2113
借酒劲吻你
借酒劲吻你 2020-11-27 15:44

I have a Git repository in a directory served by apache on a server. I have configured WebDAV and it seems to be running correctly. Litmus returns 100% success.

I ca

8条回答
  •  孤独总比滥情好
    2020-11-27 16:35

    As in this post comment, what does your /Web/git/Logs/ErrorLog says about that error?

    After looking in /Web/git/Logs/ErrorLog, I found out there’s a permission problem on the lock file. In my httpd-dav.conf, I have the line…

    DavLockDB “/usr/var/DavLock”
    

    I then checked the /usr/ directory, the ‘var’ directory was missing.

    $ mkdir var
    $ cd var
    $ chown www .
    $ chgrp www .
    

    And then repeating the process seems that now I can push!! =)


    As mentioned by Eddie in the comments and by Arrowmaster in his (upvoted) answer, the smart http protocol is now part of recent Git distribution.
    The git-http-backend CGI script can takes care of any git commands through http.

    smart http

    The smarter protocols (git and ssh) would instead have a conversation with the git upload-pack process on the server which would determine the exact set of objects the client needs and build a custom packfile with just those objects and stream it over.


    Git 2.17 (Q2 2018) will add a debugging aid.

    See commit a2b9820 (24 Jan 2018) by Patryk Obara (dreamer).
    (Merged by Junio C Hamano -- gitster -- in commit 39a1dd8, 13 Feb 2018)

    http-push: improve error log

    When git push fails due to server-side WebDAV error, it's not easy to point to the main culprit.
    Additional information about exact cURL error and HTTP server response is helpful for debugging purpose.

提交回复
热议问题