Compatibility
Minecraft: Java Edition
Platforms
Supported environments
75% of ad revenue goes to creators
Support creators and Modrinth ad-free with Modrinth+Creators
Details
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:
- Go to github.com/settings/tokens
- Click on
Generate new token
- Select the repositories you want
- Make sure to select
Read-only
for theRepository permissions/Contents
permission. This might add automatically theMetadata
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>"