Git repository mirroring tool
Java CSS
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
com.io7m.gtyrell.checkstyle
com.io7m.gtyrell.core
com.io7m.gtyrell.github
com.io7m.gtyrell.server
src/site/resources
.gitignore
.travis.yml
README-CHANGES.xml
README-LICENSE.txt
README.md
pom.xml

README.md

gtyrell

Build Status Maven Central Maven Central (snapshot) Codacy Badge Codecov

gtyrell

Usage

Create a server configuration file (server.conf):

com.io7m.gtyrell.server.directory      = /tmp/gh
com.io7m.gtyrell.server.git_executable = /usr/bin/git
com.io7m.gtyrell.server.pause_duration = 0h 15m 0s

com.io7m.gtyrell.server.repository_sources = github0

com.io7m.gtyrell.server.repository_source.github0.type     = github
com.io7m.gtyrell.server.repository_source.github0.user     = yourgithubusername
com.io7m.gtyrell.server.repository_source.github0.password = yourgithubpassword

The above will attempt to sync repositories from GitHub to /tmp/gh every 15 minutes.

Run the server:

$ java -jar com.io7m.gtyrell.server-1.0.0-main.jar server.conf

The server will not fork into the background and can be safely used under a process supervision system such as s6 without issues.

Inclusions/Exclusions

It's possible to explicitly include and exclude repositories from being cloned and/or updated. This is achieved by specifying an inclusion and/or an exclusion pattern for the repository source:

com.io7m.gtyrell.server.repository_source.github0.type     = github
com.io7m.gtyrell.server.repository_source.github0.user     = yourgithubusername
com.io7m.gtyrell.server.repository_source.github0.password = yourgithubpassword
com.io7m.gtyrell.server.repository_source.github0.include  = ^ExampleOwner/ReposA$
com.io7m.gtyrell.server.repository_source.github0.exclude  = ^$

Patterns are given in Java regular expression syntax and are matched against the incoming repository owner and name separated by a slash. The exact check performed is includes(name) && !excludes(name). If no patterns are specified, then the patterns default to the following values:

com.io7m.gtyrell.server.repository_source.github0.include  = ^.*$
com.io7m.gtyrell.server.repository_source.github0.exclude  = ^$

This has the effect of including every repository, and excluding none of them.

# Include everything but exclude io7m/gtyrell
com.io7m.gtyrell.server.repository_source.github0.include  = ^.*$
com.io7m.gtyrell.server.repository_source.github0.exclude  = ^io7m/gtyrell$

# Include only io7m projects
com.io7m.gtyrell.server.repository_source.github0.include  = ^io7m/.*$
com.io7m.gtyrell.server.repository_source.github0.exclude  = ^$