1

I have set up a git server over http, and i am able to successfully clone or pull from the http server, but when i give a git push, i am getting the following error

  Fetching remote heads...
 refs/
 refs/tags/
 refs/heads/
updating 'refs/heads/master'
from bc6087dffe872999105c79e8b4bdb34d3a5b7bce
to   90e7a617d575f82060c587badc0740733131266c
sending 2 objects
MKCOL 9d815311716ad694266a0cff2f17205aa12ee87c failed, aborting (22/403)
MKCOL 90e7a617d575f82060c587badc0740733131266c failed, aborting (22/403)
Updating remote server info
fatal: git-http-push failed

Can we perform a git push over http, or http can be used only for read access ? or can it be used for write access also ?

I have Web DAV on, do i have to make any other changes to be able to perform a git push ?

1 Answer 1

1

Don't use WebDAV. Set up your HTTP server to be a smart HTTP server.

If you're using Apache and have git installed in /usr, then you can add this to your httpd.conf:

SetEnv GIT_PROJECT_ROOT [path_to_git_repo_root]
SetEnv GIT_HTTP_EXPORT_ALL
ScriptAlias /git/ /usr/libexec/git-core/git-http-backend/
Sign up to request clarification or add additional context in comments.

1 Comment

Be aware that on other systems, the git-http-backend script may be in a different location

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.