1

smart-http を使用して git サーバーをセットアップしました。リポジトリからクローンまたはプルを実行するための読み取りアクセスを取得できましたが、変更をプッシュするための書き込みアクセスを取得できませんでした。次のようにエラーを取得します。

    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>

これらのファイルの間違いを指摘できる人はいますか? または、それらを構成する他の方法はありますか?

4

0 に答える 0