rclone gitannex
通过 stdin/stdout 与 git-annex 对话。
简介
通过 Rclone 的 gitannex
子命令,git-annex 可以从 rclone 远端存储和检索内容。
存储和检索内容。 该命令由 git-annex 运行,而非直接由
用户运行。
在 Linux 上安装
-
如果您的 git-annex 版本是 10.20240430 或更新版本,请跳过这一步。 否则,您必须在 PATH 的某个地方创建一个符号链接,并以特定的 名称的链接。 这个符号链接可以帮助 git-annex 告诉 rclone 它要运行 “gitannex”。 子命令。
# Create the helper symlink in "$HOME/bin". ln -s "$(realpath rclone)" "$HOME/bin/git-annex-remote-rclone-builtin" # Verify the new symlink is on your PATH. which git-annex-remote-rclone-builtin
-
在 git-annex repo 中添加一个新远程。 这个新远程将连接 gitannex` 子命令。
首先让 git-annex 描述远程的可用配置 参数。
# If you skipped step 1: git annex initremote MyRemote type=rclone --whatelse # If you created a symlink in step 1: git annex initremote MyRemote type=external externaltype=rclone-builtin --whatelse
NOTE: If you’re porting an existing git-annex-remote-rclone remote to use
rclone gitannex
, you can probably reuse the configuration parameters verbatim without renaming them. Check parameter synonyms with--whatelse
as shown above.以下示例创建了一个名为 “MyRemote” 的新 git-annex 远程仓库, 它将使用名为 “SomeRcloneRemote” 的 rclone 远程仓库。该 rclone 远程仓库必须是您在 rclone.conf 文件中配置的, 您可以使用
rclone config file
命令找到该文件的位置。git annex initremote MyRemote \ type=external \ externaltype=rclone-builtin \ encryption=none \ rcloneremotename=SomeRcloneRemote \ rcloneprefix=git-annex-content \ rclonelayout=nodir
-
在您将宝贵的数据托付给此命令之前,请务必测试远程。 远程**。 该命令非常新,尚未在许多 rclone 后端进行过测试。 请谨慎使用!
git annex testremote MyRemote
Happy annexing!
rclone gitannex [flags]
Options
-h, --help help for gitannex
有关此处未列出的全局选项,请参阅 全局标志页面。
另请参见
- rclone](/commands/rclone/) - 显示 rclone 命令、标志和后端帮助。