简体   繁体   中英

Public access on my own git server

I create my own git server following the official how-to . SSH access works perfectly while my computer SSH key is on the server. But I'd like to add a public access (to be able to do git clone http://site.com/git.git without any key or password). To do this I read this part of the tutorial .

  1. My first question is for the group owner. I don't have a www-data group but a http group so I put this one. Can it be wrong ?

  2. My second question is about the vhost.conf file. I have a gitweb vhost which look like this.

The vhost file :

<VirtualHost *:80>
    ServerName www.git.site.com  
    ServerAlias git.site.com
    DocumentRoot "/srv/http/git"  
    ErrorLog "/var/log/httpd/git"  
    CustomLog "/var/log/httpd/git" common  
    <Directory /srv/http/git>  
       Options ExecCGI +FollowSymLinks +SymLinksIfOwnerMatch
        AllowOverride All
        order allow,deny
        Allow from all
        AddHandler cgi-script cgi
        DirectoryIndex gitweb.cgi
    </Directory>
</VirtualHost>

I've to put this code :

<VirtualHost *:80>
    ServerName git.gitserver
    DocumentRoot /opt/git
    <Directory /opt/git/>
        Order allow, deny
        allow from all
    </Directory>
</VirtualHost>

What's gitserver ? And can I merge this code with the gitweb vhost because I think that gitserver = site.com ? And how ?

  1. Indeed, if your group is http then change the instructions to http .

  2. Secondly, gitserver in the tutorial is the domain name. Change it to whatever you want.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM