I found the answer:
when doing LocalRegistry.register(MyPackage, ..., repo="...")
I needed to use the repo
key because my local checkout has two remotes. Here I messed it up, specifying the wrong remote which then lead to this error.
Fixing it directly in MyLocalRegistry made it work.