git推送智能http的错误?

时间:2013-10-30 22:05:41

标签: git apache http

我已经使用smart-http设置了一个git服务器,我可以实现读取访问,从存储库中进行克隆或拉取,但是我无法实现写访问以推送更改,所以当我给git push origin master时,我收到错误,

    error: Cannot access URL http://username:password@localhost/, return code 22
    fatal: git-http-push failed

我有我的httpd.conf文件,

   ServerName localhost

   SetEnv GIT_PROJECT_ROOT /home/nitin/nitinhtml
   SetEnv GIT_HTTP_EXPORT_ALL
   SetEnv REMOTE_USER=$REDIRECT_REMOTE_USER
   ScriptAlias /git/ /usr/libexec/git-core/git-http-backend/

   <LocationMatch "^/git/.*/git-receive-pack$">
   AuthType Basic
   AuthName "Git Access"
   Require group committers

   </LocationMatch>

我将sites-enabled / mysite文件配置为

     <VirtualHost *:80>
    ServerAdmin webmaster@localhost
    ServerName gitserver1234
    ServerAlias www.gitserver1234.com
    SetEnv GIT_PROJECT_ROOT /home/nitin/nitinhtml
    SetEnv GIT_HTTP_EXPORT_ALL
    SetEnv REMOTE_USER=$REDIRECT_REMOTE_USER
    ScriptAlias /git /var/www/gitweb/gitweb.cgi/

    <Location /nitin>
      AuthType Basic
      AuthName "Private Git Access"
      AuthUserFile "/etc/git-auth-file"
      Required valid-user
    </Location>

    DocumentRoot /home/nitin/nitinhtml
    <Directory />
     Options FollowSymLinks
            AllowOverride None
    </Directory>

    <Directory /home/nitin/nitinhtml>
            Options EXecCGI Indexes
            AllowOverride None
            Order allow,deny
            allow from all
              </Directory>

    ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
    <Directory "/usr/lib/cgi-bin">
            AllowOverride None
            Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
            Order allow,deny
            Allow from all
    </Directory>
     ErrorLog ${APACHE_LOG_DIR}/error.log

    # Possible values include: debug, info, notice, warn, error, crit,
    # alert, emerg.
    LogLevel warn

    CustomLog ${APACHE_LOG_DIR}/access.log combined

Alias /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
      # Possible values include: debug, info, notice, warn, error, crit,
    # alert, emerg.
    LogLevel warn

    CustomLog ${APACHE_LOG_DIR}/access.log combined

Alias /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
    Options Indexes MultiViews FollowSymLinks
    AllowOverride None
    Order deny,allow
    Deny from all
    Allow from 127.0.0.0/255.0.0.0 ::1/128
 </Directory>

 </VirtualHost>

有人能指出这些文件中的错误吗?或者有没有其他方法来配置它们?

0 个答案:

没有答案