Difference between revisions of "Git"

From SME Server
Jump to navigationJump to search
Line 3: Line 3:
 
[mailto:marco.hess@through-ip.com Marco Hess]
 
[mailto:marco.hess@through-ip.com Marco Hess]
 
=== 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.
+
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.
  
 
  [[File:Smeserver-git_server_manager_menu.png|right‎]]
 
  [[File:Smeserver-git_server_manager_menu.png|right‎]]
Line 14: Line 14:
 
* Per repository network access setting for either local only or internet.
 
* Per repository network access setting for either local only or internet.
 
* All repositories accessed over HTTPS for easy remote access through firewalls.
 
* All repositories accessed over HTTPS for easy remote access through firewalls.
* Separate name space for Git repositories using git subdomain (i.e. independent of ibays and other resources on the server)
+
* Separate name space for Git repositories using git as a prefix (i.e. independent of ibays and other resources on the server)
 
* Email notification of push operations to all users that have either pull or push access to the repository
 
* Email notification of push operations to all users that have either pull or push access to the repository
 
* Web viewing of repositories through gitweb
 
* Web viewing of repositories through gitweb
Line 23: Line 23:
  
 
=== Installation ===
 
=== Installation ===
For the '''smeserver-git''' contrib is currently no RPM available for this package but a very alpha (but functional) version is available from my Git repository and can be anonymously cloned. Use the following guidelines for a manual install:
+
While still very alpha, there are now RPMs available from my personal repository that can be found at
 +
 
 +
http://through-ip.com/packages/smeserver/i386/repoview/
 +
 
 +
Source RPMs are also available, as well as cloning with Git from either:
 +
 
 +
http://git.through-ip.com
 +
 
 +
or from GitHub:
 +
 
 +
# https://github.com/MarcoHess/smeserver-git/tree/smeserver-git
 +
# 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 ====
 
==== Dag Repositpory ====
Line 32: Line 47:
 
==== Install Git RPM's ====
 
==== Install Git RPM's ====
  
  yum --enablerepo=dag install git gitweb
+
  yum --enablerepo=through-ip --enablerepo=dag install smeserver-git smeserver-gitweb smeserver-gitweb-theme
  
 
==== Clone the smeserver-git repository ====
 
==== Clone the smeserver-git repository ====
Line 42: Line 57:
  
 
  git clone https://git.through-ip.com/smeserver-git.git
 
  git clone https://git.through-ip.com/smeserver-git.git
 
==== Add a 'git' hostname ====
 
 
In the server-manager panel under '''Configuration''' & '''Hostnames and addresses''', add a host with the name of 'git' to your domain with the location '''Self'''
 
 
==== Installing the contrib ====
 
 
{{Note box|''The repository contains an install script that can be used to install the required files but your mileage may vary.''
 
}}
 
 
First add a couple of config variables:
 
 
config set git service status enabled domain git.yourserver.com allow_access_from local
 
 
Enter the directory where you cloned the git repository:
 
 
cd smeserver-git
 
 
Make the script executable and run it:
 
 
chmod +x install-smeserver-git.sh
 
./install-smeserver-git
 
 
=== Removal ===
 
The repository contains an uninstall script:
 
 
./uninstall-smeserver-git.sh
 
  
 
=== Feedback ===
 
=== Feedback ===

Revision as of 13:51, 29 January 2013

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

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.

right‎

The current feature list include:

  • Create & manage centralised git repositories through the SME server-manager panel.
  • Access rights based on SME server users and groups.
  • Per repository settings for pull and push access control (including support for setting anonymous access).
  • Per repository network access setting for either local only or internet.
  • All repositories accessed over HTTPS for easy remote access through firewalls.
  • Separate name space for Git repositories using git as a prefix (i.e. independent of ibays and other resources on the server)
  • Email notification of push operations to all users that have either pull or push access to the repository
  • Web viewing of repositories through gitweb
  • Gravatars support in gitweb
  • Automatic markdown of README.md into README.html and shown in gitweb
Smeserver-git server manager home screen3.png

Installation

While still very alpha, there are now RPMs available from my personal repository that can be found at

http://through-ip.com/packages/smeserver/i386/repoview/

Source RPMs are also available, as well as cloning with Git from either:

http://git.through-ip.com

or from GitHub:

  1. https://github.com/MarcoHess/smeserver-git/tree/smeserver-git
  2. https://github.com/MarcoHess/smeserver-git/tree/smeserver-gitweb
  3. https://github.com/MarcoHess/smeserver-git/tree/smeserver-gitweb-theme

Through IP Repositpory

The following command will configure the Through-IP repository on SME Server.

/sbin/e-smith/db yum_repositories set through-ip repository \
BaseURL http://through-ip.com/packages/smeserver/i386/ \
Name 'Through IP Pty. Ltd.' \
EnableGroups yes \
Visible yes \
GPGCheck no \
status disabled

After adding it to the database we have to update the changes to the configuration file:

signal-event yum-modify

Dag Repositpory

The Git packages comes from the Dag repository:

The following command will configure the Dag repository on SME Server. EDIT NOT COMPLETE!


To create an entry in the database for the epel repository we open put the following commands in a terminal window or in a shell window:

/sbin/e-smith/db yum_repositories set epel repository \

Name 'SME Server - epel' \
BaseURL 'http://<http://download.fedoraproject.org/pub/epel/7/$basearch' \
EnableGroups yes \
GPGCheck yes \
Visible no \
status disabled

To enable the changes:

    signal-event yum-modify

Just to be sure, give yum a fresh start:

    yum clean all

After adding it to the database we have to update the changes to the configuration file:

signal-event yum-modify

Make sure you use the settings for SME8 (check the discussion page)

Install Git RPM's

yum --enablerepo=through-ip --enablerepo=dag install smeserver-git smeserver-gitweb smeserver-gitweb-theme

Clone the smeserver-git repository

Set your git to ignore self signed SSL certificates with:

git config --global http.sslVerify false

Now clone the repository:

git clone https://git.through-ip.com/smeserver-git.git

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

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