This commit adds a new subcommand named "gitannex", aka "git-annex-remote-rclone-builtin" when invoked via a symlink. This accomplishes milestone 1 from issue #7625: "minimal support for the external special remote protocol". Issue #7625
1.6 KiB
Rclone's gitannex subcommand enables git-annex to store and retrieve content from an rclone remote. It expects to be run by git-annex, not directly by users. It is an "external special remote program" as defined by git-annex.
Installation on Linux
-
Create a symlink and ensure it's on your PATH. For example:
ln -s "$(realpath rclone)" "$HOME/bin/git-annex-remote-rclone-builtin"
-
Add a new external remote to your git-annex repo.
The new remote's type should be "rclone-builtin". When git-annex interacts with remotes of this type, it will try to run a command named "git-annex-remote-rclone-builtin", so the symlink from the previous step should be on your PATH.
The following example creates a new git-annex remote named "MyRemote" that will use the rclone remote named "SomeRcloneRemote". This rclone remote must be configured in your rclone.conf file, wherever that is located on your system. The rcloneprefix value ensures that content is only written into the rclone remote underneath the "git-annex-content" directory.
git annex initremote MyRemote \ type=external \ externaltype=rclone-builtin \ encryption=none \ rcloneremotename=SomeRcloneRemote \ rcloneprefix=git-annex-content
-
Before you trust this command with your precious data, be sure to test the remote. This command is very new and has not been tested on many rclone backends. Caveat emptor!
git annex testremote my-rclone-remote
Happy annexing!