Difference between revisions of "Git"

From SME Server
Jump to navigationJump to search
 
(31 intermediate revisions by one other user not shown)
Line 2: Line 2:
 
=== Developer / Maintainer ===
 
=== Developer / Maintainer ===
 
[mailto:marco.hess@through-ip.com Marco Hess]
 
[mailto:marco.hess@through-ip.com Marco Hess]
 +
 +
=== Versions ===
 +
{{ #smeversion: smeserver-git}}
 +
{{ #smeversion: smeserver-gitweb}}
 +
{{ #smeversion: smeserver-gitweb-theme}}
 +
 
=== Description ===
 
=== Description ===
This is a place holder for a '''Git''' integration contrib for SME server that is currently under development. It integrates '''git''' with '''git-http-backend''' and '''gitweb''' into SME8. Have a look http://git.through-ip.com for a live instance of the contrib.
+
This is a place holder for a '''Git''' integration and collaboration contrib for SME server. This contrib turns your SME8 or SME9 server into an easy to manage centralised 'git' repository server. Access is with HTTPS and fine grained access permissions are handled through the SME users and groups. Web viewing is provided with the optional '''gitweb''' contrib and its GitHub like theme.
 +
 
 +
Have a look http://through-ip.com/git for a live instance of this contrib.
  
 
  [[File:Smeserver-git_server_manager_menu.png|right‎]]
 
  [[File:Smeserver-git_server_manager_menu.png|right‎]]
Line 10: Line 18:
  
 
* Create & manage centralised git repositories through the SME server-manager panel.
 
* Create & manage centralised git repositories through the SME server-manager panel.
* Access rights based on SME server users and groups.
+
* Per repository network access configurable for either 'Local network Only' or 'Internet'.
* Per repository settings for pull and push access control (including support for setting anonymous access).
+
* Repositories accessed over HTTP/HTTPS for easy remote access through firewalls.
* Per repository network access setting for either local only or internet.
+
* Access permissions are based on your SME server users and groups configuration.
* All repositories accessed over HTTPS for easy remote access through firewalls.
+
* Git PULL and PUSH permissions can be controlled separately.
* Separate name space for Git repositories using git as a prefix (i.e. independent of ibays and other resources on the server)
+
* Support for '''Anonymous''' access PULL and/or PUSH.
* Email notification of push operations to all users that have either pull or push access to the repository
+
* Separate name space for Git repositories using /git as a prefix (i.e. the git repository names are independent of ibays and other resources on the server).
* Web viewing of repositories through gitweb
+
* Automatic email notification of push operations to all users that have either pull or push access to that repository.
* Gravatars support in gitweb
+
* Web viewing of repositories through gitweb with full view access to local users, but from the internet only the anonymous accessible repositories or with a login, those repositories that that user has permissions for.
* Automatic markdown of README.md into README.html and shown in gitweb
+
* Special GitHub style theme for gitweb viewer (optionally, but highly recommended).
 +
* Syntax colouring when viewing code in the web view.
 +
* Gravatars support in the gitweb web view.
 +
* Automatic markdown of README.md into README.html and shown in gitweb repository summary.
  
 
  [[File:Smeserver-git_server_manager_home_screen3.png]]
 
  [[File:Smeserver-git_server_manager_home_screen3.png]]
  
 
=== Installation ===
 
=== Installation ===
While still very alpha, there are now RPMs available from my personal repository that can be found at
+
There are now RPMs available from the smedev repository.
 +
 
 +
==== Epel Repository ====
 +
The Git packages and the Highlight comes from the [http://wiki.contribs.org/Epel Epel] repository.
 +
Check the instructions on that wiki page and make sure you use the settings matching your server (either '''SME8''' or '''SME9''').
 +
 
 +
On SME8 it installs Git 1.8 from the Epel repository. On SME9 it is only git 1.7 and from the base repository.
 +
 
 +
==== Install the SME Server Git RPM's ====
 +
 
 +
yum --enablerepo=smecontribs,epel install smeserver-git smeserver-gitweb smeserver-gitweb-theme
 +
 
 +
==== Subversion conflict with smeserver-subversion ====
 +
 
 +
The [http://wiki.contribs.org/Subversion SME Server Subversion] contribs currently has a small conflict in the subversion RPM's that are used for the smeserver-subversion (version 1.6.15 from smecontribs) and smeserver-git (vesion 1.6.11 from dag) contribs whereby the smecontribs repository does not have the subversion-perl package:
 +
 
 +
As a workaround both contribs can be installed together:
 +
 
 +
# Remove the smeserver-subversion and subversion rpms
 +
# Install smeserver-git as above.
 +
# Install smeserver-subversion with the steps below:
 +
 
 +
wget http://pkgs.repoforge.org/subversion/subversion-perl-1.6.15-0.1.el5.rfx.i386.rpm
 +
yum localinstall subversion-perl-1.6.15-0.1.el5.rfx.i386.rpm install smeserver-subversion --enablerepo=smecontribs
 +
 
 +
=== Notes on using SME Server Git ===
 +
 
 +
==== Further Configuration ====
 +
 
 +
There are a few configuration parameters in the config database as follows:
 +
 
 +
Show the current git configuration:
 +
 
 +
  config show git
 +
 
 +
===== status =====
 +
 
 +
Configure if the HTTP access to 'git' is to be enabled. Default 'enabled'.
 +
 
 +
===== GitWeb =====
 +
 
 +
Configure if gitweb is enabled or disabled. Default enabled when smeserver-gitweb is installed.
 +
 
 +
===== GitWebTheme =====
 +
 
 +
Configure if theme for gitweb is enabled or disabled. Default enabled when smeserver-gitweb-theme is installed.
  
http://through-ip.com/packages/smeserver/i386/repoview/
+
===== debugging =====
  
Source RPMs are also available, as well as cloning with Git from either:
+
Configure the LogLevel used in apache for debugging the git configuration. Default 'disabled'. Generates a lot of log data. Use with caution.
  
http://git.through-ip.com
+
===== gitweb_access_from =====
  
or from GitHub:
+
Configure network level access to the gitweb interface. Settings 'disabled', 'local' or 'internet'.
  
# https://github.com/MarcoHess/smeserver-git/tree/smeserver-git
+
===== SystemName =====
# https://github.com/MarcoHess/smeserver-git/tree/smeserver-gitweb
 
# https://github.com/MarcoHess/smeserver-git/tree/smeserver-gitweb-theme
 
 
==== Through IP Repositpory ====
 
{{Repository|Through-IP}}
 
  
==== Dag Repositpory ====
+
Configure the shown system name in gitweb. Defaults to the config db 'SystemName'.
The Git packages comes from the [http://wiki.contribs.org/Dag Dag] repository:
 
{{Repository|Dag}}
 
Make sure you use the settings for '''SME8''' '''(check the discussion page)'''
 
  
==== Install Git RPM's ====
+
===== DomainName =====
  
yum --enablerepo=through-ip --enablerepo=dag install smeserver-git smeserver-gitweb smeserver-gitweb-theme
+
Configure the shown domain name in gitweb. Defaults to the config db 'DomainName'.
  
==== Clone the smeserver-git repository ====
+
==== Git client needs to ignore self signed SSL certificates ====
Set your git to ignore self signed SSL certificates with:
+
 
 +
The Git client validates the HTTP SSL security certificate when accessing a repository. With the self signed certificates typical on SME servers, you will get an error like '''certificate verify failed''' when accessing the Git repository. You can avoid this problem by by setting the http sslVerify flag to false. Using a command line, you can do this in your Git client as follows:
  
 
  git config --global http.sslVerify false
 
  git config --global http.sslVerify false
  
Now clone the repository:
+
In a git config file, this looks like:
  
  git clone https://git.through-ip.com/smeserver-git.git
+
  [http]
 +
    sslVerify = false
  
 
=== Feedback ===
 
=== Feedback ===
 
I welcome any feedback on this contrib for bugs, features or assistance (e.g. turning it into an RPM). Email me at the address found at the top of this page.
 
I welcome any feedback on this contrib for bugs, features or assistance (e.g. turning it into an RPM). Email me at the address found at the top of this page.
  
=== Additional information ===
+
=== Additional information on git ===
 
More information about Git can be found on http://git-scm.com/.
 
More information about Git can be found on http://git-scm.com/.
  
 +
=== Bug Reporting & Tracking ===
 +
Please raise bugs under the SME-Contribs section in {{BugzillaFileBug|product=|component=|title=bugzilla}}and select the '''smeserver-git''', '''smeserver-gitweb''' or '''smeserver-gitweb-theme''' component or use these links: {{BugzillaFileBug|product=SME%20Contribs|component=smeserver-git|title=smeserver-git}}, {{BugzillaFileBug|product=SME%20Contribs|component=smeserver-gitweb|title=smeserver-gitweb}}, {{BugzillaFileBug|product=SME%20Contribs|component=smeserver-gitweb-theme|title=smeserver-gitweb-theme}}
 +
 +
Below is an overview of the current issues for these contribs:
 +
==== smeserver-git ====
 +
{{#bugzilla:columns=id,product,version,status,summary |sort=id|order=desc |component=smeserver-git|noresultsmessage="No open bugs found."}}
 +
==== smeserver-gitweb ====
 +
{{#bugzilla:columns=id,product,version,status,summary |sort=id|order=desc |component=smeserver-gitweb|noresultsmessage="No open bugs found."}}
 +
==== smeserver-gitweb-theme ====
 +
{{#bugzilla:columns=id,product,version,status,summary |sort=id|order=desc |component=smeserver-gitweb-theme|noresultsmessage="No open bugs found."}}
 
----
 
----
  

Latest revision as of 08:37, 10 June 2016

PythonIcon.png Skill level: Developer
Risk of inconsistencies with Koozali SME Server methodology, upgrades & functionality is high. One must be knowledgeable about how changes impact their Koozali SME Server. Significant risk of irreversible harm.


Developer / Maintainer

Marco Hess

Versions

Devel 10:
Contrib 10:
Contrib 9:
smeserver-git
The latest version of smeserver-git is available in the SME repository, click on the version number(s) for more information.


Contrib 10:
Contrib 9:
smeserver-gitweb
The latest version of smeserver-gitweb is available in the SME repository, click on the version number(s) for more information.


Contrib 10:
Contrib 9:
smeserver-gitweb-theme
The latest version of smeserver-gitweb-theme is available in the SME repository, click on the version number(s) for more information.


Description

This is a place holder for a Git integration and collaboration contrib for SME server. This contrib turns your SME8 or SME9 server into an easy to manage centralised 'git' repository server. Access is with HTTPS and fine grained access permissions are handled through the SME users and groups. Web viewing is provided with the optional gitweb contrib and its GitHub like theme.

Have a look http://through-ip.com/git for a live instance of this contrib.

right‎

The current feature list include:

  • Create & manage centralised git repositories through the SME server-manager panel.
  • Per repository network access configurable for either 'Local network Only' or 'Internet'.
  • Repositories accessed over HTTP/HTTPS for easy remote access through firewalls.
  • Access permissions are based on your SME server users and groups configuration.
  • Git PULL and PUSH permissions can be controlled separately.
  • Support for Anonymous access PULL and/or PUSH.
  • Separate name space for Git repositories using /git as a prefix (i.e. the git repository names are independent of ibays and other resources on the server).
  • Automatic email notification of push operations to all users that have either pull or push access to that repository.
  • Web viewing of repositories through gitweb with full view access to local users, but from the internet only the anonymous accessible repositories or with a login, those repositories that that user has permissions for.
  • Special GitHub style theme for gitweb viewer (optionally, but highly recommended).
  • Syntax colouring when viewing code in the web view.
  • Gravatars support in the gitweb web view.
  • Automatic markdown of README.md into README.html and shown in gitweb repository summary.
Smeserver-git server manager home screen3.png

Installation

There are now RPMs available from the smedev repository.

Epel Repository

The Git packages and the Highlight comes from the Epel repository. Check the instructions on that wiki page and make sure you use the settings matching your server (either SME8 or SME9).

On SME8 it installs Git 1.8 from the Epel repository. On SME9 it is only git 1.7 and from the base repository.

Install the SME Server Git RPM's

yum --enablerepo=smecontribs,epel install smeserver-git smeserver-gitweb smeserver-gitweb-theme

Subversion conflict with smeserver-subversion

The SME Server Subversion contribs currently has a small conflict in the subversion RPM's that are used for the smeserver-subversion (version 1.6.15 from smecontribs) and smeserver-git (vesion 1.6.11 from dag) contribs whereby the smecontribs repository does not have the subversion-perl package:

As a workaround both contribs can be installed together:

  1. Remove the smeserver-subversion and subversion rpms
  2. Install smeserver-git as above.
  3. Install smeserver-subversion with the steps below:
wget http://pkgs.repoforge.org/subversion/subversion-perl-1.6.15-0.1.el5.rfx.i386.rpm
yum localinstall subversion-perl-1.6.15-0.1.el5.rfx.i386.rpm install smeserver-subversion --enablerepo=smecontribs

Notes on using SME Server Git

Further Configuration

There are a few configuration parameters in the config database as follows:

Show the current git configuration:

 config show git
status

Configure if the HTTP access to 'git' is to be enabled. Default 'enabled'.

GitWeb

Configure if gitweb is enabled or disabled. Default enabled when smeserver-gitweb is installed.

GitWebTheme

Configure if theme for gitweb is enabled or disabled. Default enabled when smeserver-gitweb-theme is installed.

debugging

Configure the LogLevel used in apache for debugging the git configuration. Default 'disabled'. Generates a lot of log data. Use with caution.

gitweb_access_from

Configure network level access to the gitweb interface. Settings 'disabled', 'local' or 'internet'.

SystemName

Configure the shown system name in gitweb. Defaults to the config db 'SystemName'.

DomainName

Configure the shown domain name in gitweb. Defaults to the config db 'DomainName'.

Git client needs to ignore self signed SSL certificates

The Git client validates the HTTP SSL security certificate when accessing a repository. With the self signed certificates typical on SME servers, you will get an error like certificate verify failed when accessing the Git repository. You can avoid this problem by by setting the http sslVerify flag to false. Using a command line, you can do this in your Git client as follows:

git config --global http.sslVerify false

In a git config file, this looks like:

[http]
    sslVerify = false

Feedback

I welcome any feedback on this contrib for bugs, features or assistance (e.g. turning it into an RPM). Email me at the address found at the top of this page.

Additional information on git

More information about Git can be found on http://git-scm.com/.

Bug Reporting & Tracking

Please raise bugs under the SME-Contribs section in bugzilla and select the smeserver-git, smeserver-gitweb or smeserver-gitweb-theme component or use these links: smeserver-git , smeserver-gitweb , smeserver-gitweb-theme


Below is an overview of the current issues for these contribs:

smeserver-git

"No open bugs found."

smeserver-gitweb

"No open bugs found."

smeserver-gitweb-theme

"No open bugs found."