Download the PHP package cytopia/check_git without Composer

On this page you can find all versions of the php package cytopia/check_git. 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 check_git

check_git

Nagios plugin to verify a git directory. Checks include git status (with or without submodules), HEAD is on a branch or tag (any or specified), has diffs against remote (with or without submodules), HEAD (tag, branch or commit) is GPG signed and the signature is valid.

Build Status Latest Stable Version Total Downloads Latest Unstable Version License POSIX Type


Awesome-Nagios-Plugins Find more plugins at Awesome Nagios
Icinga Exchange Find more plugins at Icinga Exchange
Nagios Exchange Find more plugins at Nagios Exchange

1. Nagios / Icinga integration

There are two ways how to integrate this with nagios or icinga.

1.1 Direct approach (not recommended)

Use check_git directly from nagios and test a repository every time a check is triggered. In order for the output to be usaeble by Nagios / Icinga, you will have to use -n <NAME>, which will amongst others remove the shell colors from the output. Correct exit codes for success, warning, error and unknown are thrown by default.

Example

1.2 Approach to just parse a logfile (recommended)

This approach reduces the overhead to check a repository every 5min by nagios, and rather check the logfile created by check_git. Sometimes a full check (status, gpg, remote check, etc) can take up to a few seconds and u don't want to stress the system every 5min.

For that to work, you simply add check_git to your crontab and only check your repository every 4 hours for example. Nagios / Icinga can still check the logfile every 5 minutes.

Crontab

This will update the logfile under /var/log/git/<project-name>.log every 4 hours and nagios/icinga can however check on it as often as they want via:

The actual check

2. Examples

The following examples show each options separately, you can of course combine most checks.

2.1 Check git status

Without submodules (-s)

With submodules (-S)

2.2 Check status of HEAD (branch or tag)

HEAD must be on a branch (any branch -b)

HEAD must be on branch develop (-B)

HEAD must be on a tag (any tag -t)

HEAD must be on tag 0.3 (-T)

2.3 Check GPG signature of commit/tag

Check if the current commit (or if HEAD is a tag, the current tag) is signed with gpg and valid (-g).

Check if the current commit (or if HEAD is a tag, the current tag) is signed with gpg, valid and matches one of the specified key ids (-G).

2.4 Check Diff against remote

Check if you have new code to pull (only makes sense if you are on a branch). Check excluding submodules (-R)

Check if you have new code to pull (only makes sense if you are on a branch). Check including submodules (-r)

2.5 Show additional verbose output

Show some verbose output (will also be visible within nagios extended output)

3. Usage


All versions of check_git with dependencies

PHP Build Version
Package Version
No informations.
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 cytopia/check_git contains the following files

Loading the files please wait ....