
GitPuller
Working with Private Repositories
To access protected repositories, you'll need to set up an access token. You can quickly create one on GitHub in the appropriate settings section. Make sure repository access is selected.
The modification searches for tokens in the following sequence: first checks environment variables, then configuration parameters. When using a token command during operation, it's applied only for the current session, overriding other authorization methods.
Setting up via Environment Variables
Use system environment variables to set a permanent access token.
For Linux and macOS:
export GITPULLER_TOKEN=<your_token>
For Windows:
CMD Command Line:
set GITPULLER_TOKEN=<your_token>
PowerShell:
$Env:GITPULLER_TOKEN = "<your_token>"
Setting up via Configuration File
Alternative method - set the token in the settings file:
gitpuller.key=<your_token>
Temporary Session Token
In the game, you can temporarily set a token that is valid only until the server restarts:
/git token <token>
Command Usage
Standard Mode
# Switching to a branch, commit, tag, or reference
git checkout <pack_name> <branch>
# Cloning a new repository into the world/datapacks folder.
# <pack_name> defines the name of the created folder
git clone <pack_name> <url>
# Getting information about current repositories
git info
# Downloading changes for the selected pack.
# If HEAD corresponded to the last available commit in the branch,
# but new commits appeared, it will switch to the last available commit
git pull <pack_name>
# Using a temporary token (not recommended)
git token <token>
MonoRepo Mode
In mono-repository mode, the git clone
command is disabled, and other commands change their syntax. More about mono-repositories in the corresponding section.
# Switching to a branch, commit, tag, or reference
git checkout <branch>
# Getting information about the current repository
git info
# Downloading changes.
# If HEAD corresponded to the last available commit in the branch,
# but new commits appeared, it will switch to the last available commit
git pull
# Using a temporary token (not recommended)
git token <token>
MonoRepo Mode
Starting from version 1.1.0, GitPuller supports mono-repository mode. In this mode, the /world/datapacks/
folder is treated as a single repository rather than a collection of individual repositories. All /git
commands now interact only with the mono-repository, not with individual repositories.
To activate this mode, you need to set the gitpuller.monorepo
parameter to your remote repository URL in the configuration:
gitpuller.monorepo=<url>
Removing this setting or setting an empty value disables the mono-repository mode.
⚠️ WARNING: the /world/datapacks/
folder must be empty before enabling this mode.