Difference between revisions of "SAC:Git Service"

From OSGeo
Jump to navigation Jump to search
(stub sub-sections of Web Interface)
(→‎gitlab: gogs -> gitea)
 
(23 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
The [[TracsvnVM]] machine hosts a few git related experimental services. This page describes where GIT repositories are and how they can be accessed.
 
The [[TracsvnVM]] machine hosts a few git related experimental services. This page describes where GIT repositories are and how they can be accessed.
 +
  
 
= Repositories =
 
= Repositories =
  
There are currently git repositories under ''/var/www/git/repos'' (served by Apache) and under ''/home/git/gogs-repositories'' (served by Gogs).
+
There are currently git repositories under <code>/var/www/git/repos</code> (served by Apache) and under <code>/home/git/gitea-repositories</code> (served by Gitea).
  
Apache runs as user ''www-data'' and thus user ''www-data'' owns the files in ''/var/www/git/repos''.
+
Apache runs as user ''www-data'' and thus user ''www-data'' owns the files in <code>/var/www/git/repos</code>.
  
[[SAC:Gogs|Gogs]] runs as user ''git'' and thus user ''git'' owns the files in ''/home/git/gogs-repositories''.
+
[[SAC:Gitea|Gitea]] runs as user ''git'' and thus user ''git'' owns the files in <code>/home/git/gitea-repositories</code>.
  
 
There are also a bunch of git repositories used for various system configurations, but they are not exposed to public services as such.
 
There are also a bunch of git repositories used for various system configurations, but they are not exposed to public services as such.
  
Some of the repositories from ``/var/www/git/repos`` are being transformed to symlinks to repos under ``/var/www/git/repos``.
+
Some of the repositories from <code>/var/www/git/repos</code> are being transformed to symlinks to repos under <code>/var/www/git/repos</code>.
 
These repositories will only be writable by the ``git`` user, but are made readable also by the rest of the world.
 
These repositories will only be writable by the ``git`` user, but are made readable also by the rest of the world.
  
= Access methods =
+
= GIT Remote URIs =
  
 
== HTTPS (Read/Write) ==
 
== HTTPS (Read/Write) ==
  
Repos in ''/var/www/git/repos'' are served via ''https://git.osgeo.org/git/REPONAME''.
+
{|
 
+
! style="text-align:left;"| Repo
Repos in ''/home/git/gogs-repositories'' are served via ''https://git.osgeo.org/_gogs_/REPONAME''.
+
! URL
 +
|-
 +
|<code>/var/www/git/repos</code>
 +
|<code>https://git.osgeo.org/git/REPONAME</code>
 +
|-
 +
|<code>/home/git/gitea-repositories</code>
 +
|<code>https://git.osgeo.org/gitea/REPONAME</code>
 +
|}
  
 
In both cases, [[SAC:LDAP|LDAP]] authentication is allowed.
 
In both cases, [[SAC:LDAP|LDAP]] authentication is allowed.
For the ''/git/REPONAME'' LDAP authentication is _required_, and you need to use the Git protocol access for an anonymous checkout.
+
For the <code>/git/REPONAME</code> LDAP authentication is _required_, and you need to use the Git protocol access for an anonymous checkout.
  
 
In both cases, ''http'' access redirects to ''https''.
 
In both cases, ''http'' access redirects to ''https''.
Line 29: Line 37:
 
== GIT protocol (Read Only) ==
 
== GIT protocol (Read Only) ==
  
Repos in ''/var/www/git/repos'' are served via git protocol with ''git://git.osgeo.org/git/REPONAME'' as long as they contain a file named ``git-daemon-export-ok``
+
Repos in <code>/var/www/git/repos</code> are served via git protocol with <code>git://git.osgeo.org/REPONAME</code> as long as they contain a file named <code>git-daemon-export-ok</code>
  
Repos in ''/home/git/gogs-repositories'' are '''NOT accessible''' via git protocol, unless made available via symlinks from ``/var/www/git/repos`` (as done for the GEOS repository, for example)
+
Repos in <code>/home/git/gitea-repositories</code> are '''NOT accessible''' via git protocol, unless made available via symlinks from <code>/var/www/git/repos</code> (as done for the GEOS repository, for example)
  
 
The handling server is [[SAC:GitDaemon]]
 
The handling server is [[SAC:GitDaemon]]
Line 37: Line 45:
 
= Web Interfaces =
 
= Web Interfaces =
  
== gitweb ==
+
== gitlab ==
 +
 
 +
GitLab is an alternative to gitea with some extra features. It can be accessed at the url https://git.osgeo.org/gitlab.
 +
 
 +
NOTE: Currently the GitLab installation is experimental and exists for evaluation purposes, it is not on the TracSVN machine but on a VM temporarely provided for the purpose by Vincent Picavet. The TracSVN machine solely acts as a reverse proxy.
 +
 
 +
See [[SAC:GitLab]] for more details.
  
 +
== gitea ==
  
'''TODO'''
+
Gitea allows anyone with an OSGeo Userid to create public or private repositories, manage access to them (individual or organization based), manage git hooks on the repositories and much more. It can be
 +
accessed at the url https://git.osgeo.org/gitea
 +
See [[SAC:Gitea]] for more details.
  
 
== trac ==
 
== trac ==
  
'''TODO'''
+
Any [[Trac_Instances|trac instance]] administrator can expose any git repository on the system by simply referencing full path to it from the repository section of the administration panel. This may be a problem for private repositories if trac instance administrators are not careful.
 +
 
 +
Commits in a so-mapped git repository can be referenced in trac ticket comments, and git commit logs can update trac tickets. Creating a git repository via Trac is not possible at the time of writing (2016-04-19)
  
== gogs ==
+
== gitweb ==
  
See [[SAC:Gogs]]
+
Gitweb gives a read-only view into repositories in <code>/var/www/git/repos</code>.
 +
The entry point url is https://git.osgeo.org/gitweb/ where only selected repositories are shown (TODO: selected where?). But knowing the url template you can access any repository under the given base directory, following symlinks, like https://git.osgeo.org/gitweb/?p=geos
  
 
= See Also =
 
= See Also =
  
[[GitInfrastructureComparison]]
+
* [[GitInfrastructureComparison]]
 +
* [[GitServiceRequirement]]
  
  
 
[[Category:Infrastructure]]
 
[[Category:Infrastructure]]
 +
[[Category:Services]]

Latest revision as of 04:07, 17 December 2017

The TracsvnVM machine hosts a few git related experimental services. This page describes where GIT repositories are and how they can be accessed.


Repositories

There are currently git repositories under /var/www/git/repos (served by Apache) and under /home/git/gitea-repositories (served by Gitea).

Apache runs as user www-data and thus user www-data owns the files in /var/www/git/repos.

Gitea runs as user git and thus user git owns the files in /home/git/gitea-repositories.

There are also a bunch of git repositories used for various system configurations, but they are not exposed to public services as such.

Some of the repositories from /var/www/git/repos are being transformed to symlinks to repos under /var/www/git/repos. These repositories will only be writable by the ``git`` user, but are made readable also by the rest of the world.

GIT Remote URIs

HTTPS (Read/Write)

Repo URL
/var/www/git/repos https://git.osgeo.org/git/REPONAME
/home/git/gitea-repositories https://git.osgeo.org/gitea/REPONAME

In both cases, LDAP authentication is allowed. For the /git/REPONAME LDAP authentication is _required_, and you need to use the Git protocol access for an anonymous checkout.

In both cases, http access redirects to https.

GIT protocol (Read Only)

Repos in /var/www/git/repos are served via git protocol with git://git.osgeo.org/REPONAME as long as they contain a file named git-daemon-export-ok

Repos in /home/git/gitea-repositories are NOT accessible via git protocol, unless made available via symlinks from /var/www/git/repos (as done for the GEOS repository, for example)

The handling server is SAC:GitDaemon

Web Interfaces

gitlab

GitLab is an alternative to gitea with some extra features. It can be accessed at the url https://git.osgeo.org/gitlab.

NOTE: Currently the GitLab installation is experimental and exists for evaluation purposes, it is not on the TracSVN machine but on a VM temporarely provided for the purpose by Vincent Picavet. The TracSVN machine solely acts as a reverse proxy.

See SAC:GitLab for more details.

gitea

Gitea allows anyone with an OSGeo Userid to create public or private repositories, manage access to them (individual or organization based), manage git hooks on the repositories and much more. It can be accessed at the url https://git.osgeo.org/gitea See SAC:Gitea for more details.

trac

Any trac instance administrator can expose any git repository on the system by simply referencing full path to it from the repository section of the administration panel. This may be a problem for private repositories if trac instance administrators are not careful.

Commits in a so-mapped git repository can be referenced in trac ticket comments, and git commit logs can update trac tickets. Creating a git repository via Trac is not possible at the time of writing (2016-04-19)

gitweb

Gitweb gives a read-only view into repositories in /var/www/git/repos. The entry point url is https://git.osgeo.org/gitweb/ where only selected repositories are shown (TODO: selected where?). But knowing the url template you can access any repository under the given base directory, following symlinks, like https://git.osgeo.org/gitweb/?p=geos

See Also