Download the PHP package mlukman/gitsync without Composer

On this page you can find all versions of the php package mlukman/gitsync. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package gitsync

Packagist Version Packagist License GitHub issues

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.

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:

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.

Using composer

Execute the following commands:

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'.

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.

First, the file must have the following file at or near the beginning of the file:

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

Next, you need to instantiate a \GitSync\Config object:

$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:

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

Repeat for as many directories as you want.

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

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

That's the basic working setup.

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.

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

\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:

// 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:

GitElephant logo


All versions of gitsync with dependencies

PHP Build Version
Package Version
Requires php Version >=5.6.0
silex/silex Version ~1.3
symfony/twig-bridge Version ^3.0
cypresslab/gitelephant Version 1.*
monolog/monolog Version 1.*
symfony/serializer Version ^3.0
mlukman/securilex Version 1.*
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package mlukman/gitsync contains the following files

Loading the files please wait ....