GitPuller

GitPuller

Mod

In-game Git management tool for datapacks.

Server Utility

102 downloads
3 followers
Follow Save
90% of ad revenue goes to creators. Go ad-free while supporting creators with Modrinth Plus. Subscribe today!

GitPuller

GitPuller is a server-side mod, mainly for development and production servers, permiting to use basic git commands in chat in order to manage datapacks.

This mod can't be used in Singleplayer

The mod has to be installed on a server.

Using /git

By default, only /git info is available for non-op players

/git info

Sends back info about git-tracked datapacks (<branch>-<commit sha1>)

Navigation

Clone a repository.

/git clone <directory to create> <git url>

Checkout to a specific commit or change of branch.

/git checkout <directory> <branch|commit>

Pull latest changes. If the current commit was the HEAD, automatically checkout to the latest avilable commit of the branch.

/git pull <directory>

Private git repostories

To access a private repository, you can generate a Github token:

  1. Go to github.com/settings/tokens
  2. Click on Generate new token
  3. Select the repositories you want
  4. Make sure to select Read-only for the Repository permissions/Contents permission. This might add automatically the Metadata permission which is also required.

Click here to see an example of the minimal configuration for a single repository in read-only.

Once your token obtained, you can use one of these three methods:

Temporary token

This solution will set the token until the server shuts down. The token will have to be set again after the restart of the server.

/git token <token>

Configuration File

After the first launch of the server with the mod installed, a gitpullerconfig.properties file will be generated in the config folder, in the root of your server. You can set the token like this:

gitpuller.key=<token>

Environment Variable (recommended)

You can use a (system) environment variable to set a token. This method is the most recomended for a clean environment.

Unix/Linux/macOS:

export GITPULLER_TOKEN=<token>

Windows CMD:

set GITPULLER_TOKEN=<token>

Windows PowerShell:

$Env:GITPULLER_TOKEN = "<token>"

Project members

Verart

Verart

Organization

Neylz

Owner

Details

Licensed Apache-2.0
Published 6 months ago
Updated a month ago