2017 © Pedro Peláez
 

project gitsync

GitSync allows system admin to sync contents of a directory with a specific branch of a Git repository.

image

mlukman/gitsync

GitSync allows system admin to sync contents of a directory with a specific branch of a Git repository.

  • Tuesday, March 13, 2018
  • by MLukman
  • Repository
  • 1 Watchers
  • 1 Stars
  • 23 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 32 Versions
  • 0 % Grown

The README.md

GitSync logo, (*1)

Packagist Version Packagist License GitHub issues, (*2)

Introduction

GitSync is a PHP tool that will sync any directory on your server with a Git repository. It provides GUI for server admins to synchronize a directory with any commit (i.e. revision) of the source code with a click of a button., (*3)

Installation

Pre-requisites

  1. PHP 5.4 and above running on Apache2.
  2. Git already installed and added to the PATH on your machine.
  3. Composer already installed and added to the PATH on your machine.

Using Git

Execute the following commands:, (*4)

mkdir /path/to/GitSync
cd /path/to/GitSync
git clone https://github.com/MLukman/GitSync .
composer install

Then, customize index.php to match your directories. Refer the section on 'Customization' below., (*5)

Using composer

Execute the following commands:, (*6)

mkdir /path/to/GitSync
cd /path/to/GitSync
composer require mlukman/gitsync

Then, either copy index.php from folder vendor/mlukman/gitsync/ or create your own file using the following section on 'Customization'., (*7)

Customization

Basic Setup

At the minimum, index.php is the only file that you need to modify in order to customize your installation of GitSync., (*8)

First, the file must have the following file at or near the beginning of the file:, (*9)

require __DIR__.'/vendor/autoload.php';

Next, you need to instantiate a \GitSync\Config object:, (*10)

$config = new \GitSync\Config();

To add a directory to the list of directories that GitSync manages, instantiate a \GitSync\Context object and add it to the $config object using addContext() method:, (*11)

$context01 = new \GitSync\Context('\path\to\directory', 'http://remote.url/repo.git', 'branchname');
$config->addContext($context01);

Repeat for as many directories as you want., (*12)

Finally, instantiate a \GitSync\Application object while passing the $config object and let it run., (*13)

$app = new \GitSync\Application($config);
$app->run();

That's the basic working setup., (*14)

Secure Setup

Of course, GitSync without security is like begging to be hacked, so GitSync utilizes Securilex security module. Refer Securilex's README for detailed usage of the module., (*15)

To enable secure mode, you just have to call \GitSync\Application::activateSecurity method, passing an instance of \Securilex\DriverInterface to the method., (*16)

\Securilex\Driver\SimpleDriver

// create a new driver
$driver = new \Securilex\Driver\SimpleDriver();

// user with ROLE_ADMIN implicitly gets access to all contexts
$driver->addUser('admin', 'admin', array('ROLE_ADMIN'));

// user with ROLE_USER needs to be given explicit access to specific contexts
$driver->addUser('user01', 'user01', array('ROLE_USER'));

// ditto
$driver->addUser('user02', 'user02', array('ROLE_USER'));

// Add user01 & user02 to the list of user id allowed access
$context->addAllowedUid('user01')->addAllowedUid('user02');

// Activate security using the driver
$app->activateSecurity($driver);

\Securilex\Driver\LdapDriver

Using LdapSecurityProvider is similar but you need to provide the host, port and distinguised name (DN) string:, (*17)

// create a new driver
$driver = new \Securilex\Driver\LdapDriver("ldap.mycompany.com", 389, "uid={username},ou=People,o=MyCompany");

// No password needed when adding user to LdapSecurityProvider 
$driver->addUser('JohnDoe', array('ROLE_ADMIN'));

// Activate security using the driver
$app->activateSecurity($driver);

Powered by:

Silex logo, (*18)

GitElephant logo, (*19)

The Versions

13/03 2018

dev-master

9999999-dev https://github.com/MLukman/GitSync

GitSync allows system admin to sync contents of a directory with a specific branch of a Git repository.

  Sources   Download

GPL GPL-1.0-or-later

The Requires

 

by Muhammad Lukman Nasaruddin

git sync

13/03 2018

1.1.4

1.1.4.0 https://github.com/MLukman/GitSync

GitSync allows system admin to sync contents of a directory with a specific branch of a Git repository.

  Sources   Download

GPL-1.0-or-later

The Requires

 

by Muhammad Lukman Nasaruddin

git sync

08/03 2018

1.1.3a

1.1.3.0-alpha https://github.com/MLukman/GitSync

GitSync allows system admin to sync contents of a directory with a specific branch of a Git repository.

  Sources   Download

GPL-1.0-or-later

The Requires

 

by Muhammad Lukman Nasaruddin

git sync

08/03 2018

1.1.3

1.1.3.0 https://github.com/MLukman/GitSync

GitSync allows system admin to sync contents of a directory with a specific branch of a Git repository.

  Sources   Download

GPL

The Requires

 

by Muhammad Lukman Nasaruddin

git sync

07/09 2017

1.1.2

1.1.2.0 https://github.com/MLukman/GitSync

GitSync allows system admin to sync contents of a directory with a specific branch of a Git repository.

  Sources   Download

GPL

The Requires

 

by Muhammad Lukman Nasaruddin

git sync

07/09 2017

1.1.1

1.1.1.0 https://github.com/MLukman/GitSync

GitSync allows system admin to sync contents of a directory with a specific branch of a Git repository.

  Sources   Download

GPL

The Requires

 

by Muhammad Lukman Nasaruddin

git sync

06/09 2017

1.1.0

1.1.0.0 https://github.com/MLukman/GitSync

GitSync allows system admin to sync contents of a directory with a specific branch of a Git repository.

  Sources   Download

GPL

The Requires

 

by Muhammad Lukman Nasaruddin

git sync

03/08 2017

1.0.1

1.0.1.0 https://github.com/MLukman/GitSync

GitSync allows system admin to sync contents of a directory with a specific branch of a Git repository.

  Sources   Download

GPL

The Requires

 

by Muhammad Lukman Nasaruddin

git sync

31/07 2017

1.0.0

1.0.0.0 https://github.com/MLukman/GitSync

GitSync allows system admin to sync contents of a directory with a specific branch of a Git repository.

  Sources   Download

GPL

The Requires

 

by Muhammad Lukman Nasaruddin

git sync

31/07 2017

v1.x-dev

1.9999999.9999999.9999999-dev https://github.com/MLukman/GitSync

GitSync allows system admin to sync contents of a directory with a specific branch of a Git repository.

  Sources   Download

GPL

The Requires

 

by Muhammad Lukman Nasaruddin

git sync

25/07 2017

1.0.0-alpha2

1.0.0.0-alpha2 https://github.com/MLukman/GitSync

GitSync allows system admin to sync contents of a directory with a specific branch of a Git repository.

  Sources   Download

GPL

The Requires

 

by Muhammad Lukman Nasaruddin

git sync

24/07 2017

1.0.0-alpha

1.0.0.0-alpha https://github.com/MLukman/GitSync

GitSync allows system admin to sync contents of a directory with a specific branch of a Git repository.

  Sources   Download

GPL

The Requires

 

by Muhammad Lukman Nasaruddin

git sync

31/03 2017

0.10.4

0.10.4.0 https://github.com/MLukman/GitSync

GitSync allows system admin to sync contents of a directory with a specific branch of a Git repository.

  Sources   Download

GPL

The Requires

 

by Muhammad Lukman Nasaruddin

git sync

18/11 2016

0.10.3

0.10.3.0 https://github.com/MLukman/GitSync

GitSync allows system admin to sync contents of a directory with a specific branch of a Git repository.

  Sources   Download

GPL

The Requires

 

by Muhammad Lukman Nasaruddin

git sync

09/11 2016

0.10.2

0.10.2.0 https://github.com/MLukman/GitSync

GitSync allows system admin to sync contents of a directory with a specific branch of a Git repository.

  Sources   Download

GPL

The Requires

 

by Muhammad Lukman Nasaruddin

git sync

03/11 2016

0.10.1

0.10.1.0 https://github.com/MLukman/GitSync

GitSync allows system admin to sync contents of a directory with a specific branch of a Git repository.

  Sources   Download

GPL

The Requires

 

by Muhammad Lukman Nasaruddin

git sync

31/08 2016

0.10.0

0.10.0.0 https://github.com/MLukman/GitSync

GitSync allows system admin to sync contents of a directory with a specific branch of a Git repository.

  Sources   Download

GPL

The Requires

 

by Muhammad Lukman Nasaruddin

git sync

14/08 2016

0.9.1

0.9.1.0 https://github.com/MLukman/GitSync

GitSync allows system admin to sync contents of a directory with a specific branch of a Git repository.

  Sources   Download

GPL

The Requires

 

by Muhammad Lukman Nasaruddin

git sync

10/08 2016

0.9.0

0.9.0.0 https://github.com/MLukman/GitSync

GitSync allows system admin to sync contents of a directory with a specific branch of a Git repository.

  Sources   Download

GPL

The Requires

 

by Muhammad Lukman Nasaruddin

git sync

23/06 2016

0.8.0

0.8.0.0 https://github.com/MLukman/GitSync

GitSync allows system admin to sync contents of a directory with a specific branch of a Git repository.

  Sources   Download

GPL

The Requires

 

by Muhammad Lukman Nasaruddin

git sync

01/06 2016

0.7.1

0.7.1.0 https://github.com/MLukman/GitSync

GitSync allows system admin to sync contents of a directory with a specific branch of a Git repository.

  Sources   Download

GPL

The Requires

 

by Muhammad Lukman Nasaruddin

git sync

01/06 2016

dev-feature/security

dev-feature/security https://github.com/MLukman/GitSync

GitSync allows system admin to sync contents of a directory with a specific branch of a Git repository.

  Sources   Download

GPL

The Requires

 

by Muhammad Lukman Nasaruddin

git sync

31/05 2016

0.7.0

0.7.0.0 https://github.com/MLukman/GitSync

GitSync allows system admin to sync contents of a directory with a specific branch of a Git repository.

  Sources   Download

GPL

The Requires

 

by Muhammad Lukman Nasaruddin

git sync

25/05 2016

0.6.3

0.6.3.0 https://github.com/MLukman/GitSync

GitSync allows system admin to sync contents of a directory with a specific branch of a Git repository.

  Sources   Download

GPL

The Requires

 

by Muhammad Lukman Nasaruddin

git sync

20/05 2016

0.5.2

0.5.2.0 https://github.com/MLukman/GitSync

GitSync allows system admin to sync contents of a directory with a specific branch of a Git repository.

  Sources   Download

GPL

The Requires

 

by Muhammad Lukman Nasaruddin

git sync

20/05 2016

0.5.1

0.5.1.0 https://github.com/MLukman/GitSync

GitSync allows system admin to sync contents of a directory with a specific branch of a Git repository.

  Sources   Download

GPL

The Requires

 

by Muhammad Lukman Nasaruddin

git sync

19/05 2016

0.5.0

0.5.0.0 https://github.com/MLukman/GitSync

GitSync allows system admin to sync contents of a directory with a specific branch of a Git repository.

  Sources   Download

GPL

The Requires

 

by Muhammad Lukman Nasaruddin

git sync

17/05 2016

0.4.8

0.4.8.0 https://github.com/MLukman/GitSync

GitSync allows system admin to sync contents of a directory with a specific branch of a Git repository.

  Sources   Download

GPL

The Requires

 

by Muhammad Lukman Nasaruddin

git sync

10/05 2016

0.3.4

0.3.4.0 https://github.com/MLukman/GitSync

GitSync allows system admin to sync contents of a directory with a specific branch of a Git repository.

  Sources   Download

GPL

The Requires

 

by Muhammad Lukman Nasaruddin

git sync

02/05 2016

0.3.0

0.3.0.0 https://github.com/MLukman/GitSync

GitSync allows system admin to sync contents of a directory with a specific branch of a Git repository.

  Sources   Download

GPL

The Requires

 

by Muhammad Lukman Nasaruddin

git sync

27/04 2016

0.2.0

0.2.0.0 https://github.com/MLukman/GitSync

GitSync allows system admin to sync contents of a directory with a specific branch of a Git repository.

  Sources   Download

GPL

The Requires

 

by Muhammad Lukman Nasaruddin

git sync

26/04 2016

0.1.0

0.1.0.0 https://github.com/MLukman/GitSync

GitSync allows system admin to sync contents of a directory with a specific branch of a Git repository.

  Sources   Download

GPL

The Requires

 

by Muhammad Lukman Nasaruddin

git sync