openlawlibrary / taf

The Archive Framework
GNU Affero General Public License v3.0
10 stars 7 forks source link

updater: support updating bare repositories #413

Open n-dusan opened 3 months ago

n-dusan commented 3 months ago

Make updater work with bare repositories.

Currently if we run taf repo update in a bare repo, we get the following error:

(oll) λ taf repo update
Updating repository
Updating repository <org>/<law>
Cloning repository and running TUF updater...
Validation repository: cloning repository
Validation repository: trying to clone from https://github.com/<org>/<law>
Validation repository: successfully cloned from https://github.com/<org>/<law>
Running TUF validation of the authentication repository...
WARNING: Could not validate authentication repository at revision 71d9678473ad77d4c24f197bba228481d7900b01 due to error: Final root.json is expired
An error occurred while updating repository cityofsanmateo/law while running step clone_remote_and_run_tuf_updater: D:\OLL\oll-test-repos\delete-me\<org>\<law> is not a Git repository. Run `taf repo clone` instead
Called LifecycleStage.UPDATE handler. Event: failed
WARNING: Config file D:\OLL\oll-test-repos\delete-me\config.json not found. Scripts might not be executed successfully
Update of cityofsanmateo/law failed due to error: D:\OLL\oll-test-repos\delete-me\<org>\<law> is not a Git repository. Run `taf repo clone` instead