git-annex-rekey(1)

git-annex-rekey1

Change keys used for files

Usage

git annex rekey [file key ...]

Overview

This plumbing-level command is similar to migrate, but you specify both the file, and the new key to use for it.

Multiple pairs of file and key can be given in a single command line.

Note that, unlike git-annex migrate, this does not copy over metadata, urls, and other such information from the old to the new key

Options

--force

Allow rekeying of even files whose content is not currently available. Use with caution.

--batch

Enables batch mode, in which lines are read from stdin. Each line should contain the file, and the new key to use for that file, separated by a single space.

-z

Makes the --batch input be delimited by nulls instead of the usual newlines.

--json

Enable JSON output. This is intended to be parsed by programs that use git-annex. Each line of output is a JSON object.

--json-error-messages

Messages that would normally be output to standard error are included in the JSON instead.

Also the git-annex-common-options(1) can be used.

Releases

6 releases since Debian 9 (Stretch); the text changed 3 times.

  1. 9
  2. 10–11
  3. 12
  4. 13–Arch

--json since Debian 13 (Trixie); --json-error-messages since Debian 13 (Trixie); -z since Debian 10 (Buster).

Author

Joey Hess <[email protected]>

From git-annex 10.20261026-1 in Arch Linux 2026-11-01. Parsed by carta from the page's man source.