I've set up a remote git repository on my server. Here's file and directory structure

/var/lib/git/myproject1 ## the git repository for myproject1
/var/lib/git/myproject2 ## the git repository for myproject2

/var/www/mywebwebsite.com/public_html/myproject1  ## symbolic link to /var/lib/git/myproject1
/var/www/mywebwebsite.com/public_html/myproject2  ## symbolic link to /var/lib/git/myproject2

Here's what my .gitconfig looks like

[core]
    excludesfile = /var/www/.gitignore
[user]
        name = webguy
        email = support@mywebsite.com

So from my localhost I successfully ran a git pull mypro1 master, where mypro1 points to http://mywebsite.com/myproject1. The pull downloaded all the files from the remote repository as expected. But when I do a git push mypro1 master, I get the error

Cannot access URL http://mywebsite.com/myproject1/, return code 22 fatal: git-http-push failed 

I get the same error with myproject2 repository.

Did I set up git or apache incorrectly?

link|improve this question

feedback

1 Answer

up vote 1 down vote accepted

You'll need to enable dav to actively push changes over http. Check out the official git server over http guide for details on how to install it, and other things you may have missed.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.