GitPuller
私有仓库
如果你要使用私有仓库,需要设置令牌。你可以轻松地在 GitHub 此处 生成一个令牌。
请确保选择 repo 作用域。
有关如何设置令牌的更多信息,请参阅 GitHub 帮助页面。
模组首先尝试从环境变量中获取令牌,然后是从配置文件中获取。如果通过命令提供令牌,它将在当前会话中使用并覆盖其他方法。
环境变量令牌
你可以使用(系统)环境变量为所有会话设置令牌。
Unix/Linux/macOS:
export GITPULLER_TOKEN=<token>
Windows:
CMD:
set GITPULLER_TOKEN=<token>
Powershell:
$Env:GITPULLER_TOKEN = "<token>"
配置文件
你也可以在配置文件中设置令牌。
gitpuller.key=<token>
临时令牌
你可以在游戏内为当前会话设置令牌(服务器重启后将丢失)。
/git token <token>
命令用法
经典模式
# 检出到分支、提交、标签或引用
git checkout <pack name> <branch>
# 将新仓库克隆到 world/datapacks 文件夹。<pack name> 是即将创建的文件夹名称。
git clone <pack name> <url>
# 获取当前仓库的信息
git info
# 拉取所选整合包的更改。如果 HEAD 是该分支最后一个可用提交,但添加了新的提交,它将检出到最新的可用提交。
git pull <pack name>
# 使用临时令牌(不推荐)
git token <token>
MonoRepo 模式
MonoRepo 模式禁用了 git clone 命令,并改变了其他命令的语法。关于 monorepo 的更多信息见 monorepo 部分。
# 检出到分支、提交、标签或引用
git checkout <branch>
# 获取当前仓库的信息
git info
# 拉取更改。如果 HEAD 是该分支最后一个可用提交,但添加了新的提交,它将检出到最新的可用提交。
git pull
# 使用临时令牌(不推荐)
git token <token>
MonoRepo
从版本 1.1.0+ 开始,GitPuller 支持 monorepo 模式。
此模式将 /world/datapacks/ 文件夹视为单个仓库,而不是多个仓库的集合。这意味着 /git 命令现在仅与 monorepo 交互,而不是与各个仓库交互。一些命令的语法已更改以反映这一点,更多信息见 命令部分。
要启用此模式,你需要在配置中将 gitpuller.monorepo 选项设置为远程仓库的 URL。
gitpuller.monorepo=<url>
将此选项留空或从配置中移除条目将禁用 monorepo 模式。
⚠️ 警告:启用此模式前,你的 /world/datapacks/ 文件夹必须为空。
GitPuller
Private repository
If you want to use a private repository, you need to set up a token. You can easily generate a token on GitHub here.
Make sure to select the repo scope.
More information on how to set up a token can be found on the GitHub help page.
The mod first tries to use the token from the environment, then the config file. If the token is provided through the command, it will be used for the current session and override the other methods.
Environment token
You can use a (system) environment variable to set a token for all sessions.
Unix/Linux/macOS:
export GITPULLER_TOKEN=<token>
Windows:
CMD:
set GITPULLER_TOKEN=<token>
Powershell:
$Env:GITPULLER_TOKEN = "<token>"
Config file
You can also set up a token in the config file.
gitpuller.key=<token>
Temporary token
You can set up in game a token for your current session (will be lost after server restart).
/git token <token>
Commands Usage
Classic
# Checkouts to a branch, commit, tag or ref
git checkout <pack name> <branch>
# Clone a new repository into the world/datapacks folder. <pack name> is the name of the folder that will be created.
git clone <pack name> <url>
# Gets informations about the current repositories
git info
# Fetches changes for the selected pack. If the HEAD was the last available commit of the branch but new ones got added, it will checkout to the latest available commit.
git pull <pack name>
# Use a temporary token (not recommended)
git token <token>
MonoRepo mode
MonoRepo mode disables the git clone command and changes the syntax of others. More infos about mono repos in the monorepo section.
# Checkouts to a branch, commit, tag or ref
git checkout <branch>
# Gets informations about the current repository
git info
# Fetches changes. If the HEAD was the last available commit of the branch but new ones got added, it will checkout to the latest available commit.
git pull
# Use a temporary token (not recommended)
git token <token>
MonoRepo
Starting from versions 1.1.0+, GitPuller supports a monorepo mode.
This mode considers the /world/datapacks/ folder as a single repository instead of a collection of repositories. This means that the /git commands now interact only with the monorepo and not with the individual repositories. The syntax of some commands has changed to reflect this more infos in the commands section.
To enable this mode, you need to set the gitpuller.monorepo option by the URL of your distant repository in the config.
gitpuller.monorepo=<url>
Leaving this option empty or removing the entry from the config will disable the monorepo mode.
⚠️ WARNING: your /world/datapacks/ folder must be empty before enabling this mode.
下载 GitPuller
下载 GitPuller
下载 GitPuller
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 GitPuller
下载 GitPuller
下载 GitPuller
下载 GitPuller
下载 GitPuller
下载 GitPuller
下载 GitPuller
- 更新以支持 26.1+ 版本
关于这个资源的讨论、问题反馈与使用心得
还没有讨论,来发第一帖吧
你是这个资源的作者?登录后可认领此资源。
相似资源
模组
显示你正在注视的方块的信息。(适用于 Minecraft 1.16+ 的 Hwyla/Waila 分支)
模组
使用 JavaScript 编辑配方、添加自定义物品、编写世界事件!
模组
查看物品与配方
模组
在游戏画面角落显示附近世界地形、玩家、生物和实体的地图。可创建路径点,帮助你找到标记过的位置。
模组
AE2:一款流行的自动化与存储模组
模组
那是什么?一个 Waila/Hwyla 的分支。
评论 0
登录后参与评分
还没有评论,来抢沙发吧