Web Hosting Geeks | Web Hosting Experts
Need help? Call us 1(866)TOP-HOST

14655 reviews 1734 hosting providers

Questions & Answers

git push error/Cannot access,return code 22

May 7, 2012 by sally23
hi

I have set up a remote git repository on my server. This is the code
/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
This is my .gitconfig
[core]
    excludesfile = /var/www/.gitignore
[user]
        name = webguy
        email = support@mywebsite.com
On my local host 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

Does anyone know what could be the problem here?
thanks

1 Answer

0 votes
May 7, 2012 by randy999
You'll need to enable dav to actively push changes over http. Check out this guide http://ao2.it/wiki/How_to_setup_a_GIT_server_with_gitosis_and_gitweb  for details on how to install it, and other things that you might  have missed.