git-annex-lookupkey(1)

git-annex-lookupkey1

Looks up key used for file

Usage

git annex lookupkey [file ...]

Overview

This plumbing-level command looks up the key used for a file in the index. The key is output to stdout. If there is no key (because the file is not present in the index, or is not a git-annex managed file), nothing is output, and it exits nonzero.

Options

--ref

Rather than looking for the specified files in the index, interpet them as git refs. For example to find the key used for somefile in tag v1.0:

git-annex lookupkey v1.0:somefile

--batch

Enable batch mode, in which a line containing the filename is read from stdin, the key is output to stdout (with a trailing newline), and repeat.

Note that if there is no key corresponding to the file, an empty line is output to stdout instead.

-z

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

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

--ref 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.