git-annex-lookupkey(1)
π git-annex-lookupkey β the manual page, bestie edition π
okay so you're in the General Commands Manual and we're talking about git-annex-lookupkey, which is the little tool that looks up the key used for a file. that's it. that's the whole job. she's a specialist. π
β¨ NAME β¨
git-annex-lookupkey β looks up key used for file π¦
πΈ SYNOPSIS πΈ
git annex lookupkey [file ...]
π DESCRIPTION π
okay so this is a plumbing-level command (iykyk β plumbing commands are the ones other commands call, the backstage crew, the main character's makeup artist) and what it does is look up the key used for a file in the index.
the key gets printed to stdout. that's the output. that's the vibe. π
but listen β if there's no key, because either:
- the file is not present in the index, or
- it's not a git-annex managed file,
then nothing is output and it exits nonzero. no key, no party. periodt. π
β OPTIONS β
--refβ instead of looking for the specified files in the index, interpret them as git refs. so like, you can go digging through history and tags and branches and pull out the key from any point in time. iconic behaviour fr fr.
for example, to find the key used for somefile in tag v1.0:
git-annex lookupkey v1.0:somefile
--batchβ turn on batch mode β¨ in this mode, a line containing the filename is read from stdin, the key is output to stdout (with a trailing newline), and then it repeats. over and over. she doesn't stop. she's booked and busy. π₯
heads up bestie: if there's no key corresponding to the file, an empty line is output to stdout instead. so you still get a line β just a sad little empty one. π
-zβ makes the--batchinput be delimited by nulls instead of the usual newlines. perfect for filenames that are out here being chaotic with newlines in them. slay. π
also, the git-annex-common-options(1) can be used. so many options. she has range. π
π«Ά SEE ALSO π«Ά
π§ AUTHOR π§
Joey Hess <id@joeyh.name>
and that's the whole page!! git-annex-lookupkey(1), straight from the General Commands Manual, brought to you with love and also a nonzero exit status when the key isn't there πβ¨π no cap, go look up some keys bestie π¦πΈπ
π¦ where this page comes from
- alpine 3.24: git-annex-doc 10.20261026-r0 Β· AGPL-3.0-or-later
- arch rolling: git-annex 10.20261026-2 Β· AGPL-3.0-only
- debian trixie: git-annex 10.20250416-2 Β· AGPL-3.0-or-later
- debian trixie: git-annex 10.20250416-2+deb13u1 Β· AGPL-3.0-or-later
- epel 10: git-annex 10.20250320-1.el10_0 Β· AGPL-3.0-or-later
- fedora 43: git-annex 10.20250630-4.fc43 Β· AGPL-3.0-or-later
- fedora 43: git-annex 10.20250929-5.fc43 Β· AGPL-3.0-or-later
- fedora 44: git-annex 10.20260115-1.fc44 Β· AGPL-3.0-or-later
- nixos 26.05: git-annex 10.20260421
- nixpkgs unstable: git-annex 10.20260421
- opensuse-leap 16.0: git-annex 10.20250828-bp160.1.1 Β· AGPL-3.0-or-later AND GPL-3.0-or-later AND BSD-2-Clause AND MIT AND GPL-2.0-only
- opensuse-leap 16.0: git-annex 10.20250828-bp160.1.1 Β· AGPL-3.0-or-later AND GPL-3.0-or-later AND BSD-2-Clause AND MIT AND GPL-2.0-only
- opensuse-leap 16.0: git-annex 10.20250828-bp160.1.1 Β· AGPL-3.0-or-later AND GPL-3.0-or-later AND BSD-2-Clause AND MIT AND GPL-2.0-only
- ubuntu noble: git-annex 10.20240129-1build1 Β· AGPL-3.0-or-later
- ubuntu questing: git-annex 10.20250721-1
- ubuntu resolute: git-annex 10.20251029-1ubuntu1 Β· AGPL-3.0-or-later
- ubuntu stonking: git-annex 10.20251029-1ubuntu1 Β· AGPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms