git-annex/ git-annex-reregisterurl

# NAME

git-annex reregisterurl - updates url registration information

# SYNOPSIS

git annex reregisterurl `[key]`

# DESCRIPTION

This plumbing-level command updates information about the urls that are registered for a key.

# OPTIONS

- `--move-from=name|uuid`

  For each key, update any urls that are currently claimed by the specified remote to be instead used by the web special remote.

  This could be used eg, when a special remote was needed to provide authorization to get an url, but the url has now become publically available and so the web special remote can be used.

  Note that, like `git-annex unregisterurl`, using this option unregisters an url from a special remote, but it does not mark the content as not present in that special remote. However, like `git-annex registerurl`, this option does mark content as being present in the web special remote.

- `--batch`

  In batch input mode, lines are read from stdin, and each line should contain a key.

- `-z`

  When in batch mode, the input is 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.

# SEE ALSO

git-annex(1)

git-annex-registerurl(1)

git-annex-unregisterurl(1)

# AUTHOR

Joey Hess id@joeyh.name

Warning: Automatically converted into a man page by mdwn2man. Edit with care.

comment 3

Thank you Joey!

> Except for the web special remote, which is a special case. I guess yours special remote also may be a special case, ...

or in the other words, "not that special" after all. I see it just a common enough pattern for use of this new `reregisterurl` that in my case it would be easier to just add an option instead of chaining manually `reregisterurl`, figure out what key one way or another, call `setpresentkey` with `0`. After all it is for a user to announce one way or another.

Anyways, I am ok for now, hopefully would not forget next time I use it to chase with that extra invocation.

Comment by yarikoptic — Wed Oct 29 14:05:27 2025
Re: cannot "unregister" fully

You can use `git-annex setpresentkey` to tell git-annex that content is not present in your special remote.

Usually whether or not an url is currently registered with a special remote does not affect whether content is actually stored in it, which is why these are 2 different things. Except for the web special remote, which is a special case. I guess yours special remote also may be a special case, but git-annex doesn't know about it, and so why not use setpresentkey to handle the special case, rather than further complicating reregisterurl with it?

Comment by joey — Wed Oct 29 14:05:27 2025
cannot "unregister" fully

> Note that, like git-annex unregisterurl, using this option unregisters an url from a special remote, but it does not mark the content as not present in that special remote.

But then how to mark "not present" in that remote? After `git-annex-reregisterurl` I still have `[datalad]` remote listed although url now, correctly, associated with `web`. I have tried `drop` but that didn't work

    ❯ git annex drop --from datalad images/neurodesk/neurodesk-afni--21.2.00.simg
    drop images/neurodesk/neurodesk-afni--21.2.00.simg (from datalad...) (locking smaug...)
      Removal of content from urls is not possible
    failed
    drop: 1 failed

Could there may be option `--fully` or `--mark-not-present` option to make it 1 invocation operation?

Comment by yarikoptic — Wed Oct 29 14:05:27 2025
Comments on this page are closed.