Hi
I am trying to create a private GIT repo. Here's is VirtualHost Configuration in /usr/local/etc/apache24/httpd.conf file.
My git repos are present inside the folder: /home/git/repos/
test.git is a bare repository.
http.receivepack is set in the git config.
When I am trying to clone this repository, i.e, git clone http://my_ip:80/git/test.git, it asks for username and password. While pushing to the repo, I get the following error:
I have spent days trying to figure out, what could have been wrong, but with no luck. Can someone help me with this?
-Thanks
Sai Kiran.
I am trying to create a private GIT repo. Here's is VirtualHost Configuration in /usr/local/etc/apache24/httpd.conf file.
Code:
<VirtualHost *:80>
DocumentRoot "/home/git/repos"
Alias /git /home/git/repos
SetEnv GIT_PROJECT_ROOT /home/git/repos
SetEnv GIT_HTTP_EXPORT_ALL
ScriptAlias /git/ /usr/local/libexec/git-core/git-http-backend
ScriptAliasMatch \
"(?x)^/git/(.*/(HEAD | \
info/refs | \
objects/(info/[^/]+ | \
[0-9a-f]{2}/[0-9a-f]{38} | \
pack/pack-[0-9a-f]{40}\.(pack|idx)) | \
git-(upload|receive)-pack))$" \
/usr/local/libexec/git-core/git-http-backend/
<Directory /home/git/repos/test.git>
Options +ExecCGI +Indexes
AuthType Basic
AuthName "Git Authentication"
AuthUserFile /home/git/repos/.htpasswd
Require valid-user
DirectoryIndex test.git
</Directory>
</VirtualHost>
test.git is a bare repository.
http.receivepack is set in the git config.
When I am trying to clone this repository, i.e, git clone http://my_ip:80/git/test.git, it asks for username and password. While pushing to the repo, I get the following error:
Code:
error: Cannot access URL http://192.168.1.9:80/git/test.git/, return code 22
fatal: git-http-push failed
error: failed to push some refs to 'http://192.168.1.9:80/git/test.git/'
I have spent days trying to figure out, what could have been wrong, but with no luck. Can someone help me with this?
-Thanks
Sai Kiran.