Antora creates empty repository in cache when clone fails
Due to how the git client (isomorphic-git) works, it leaves behind an empty repository when the clone fails (such as when the authentication credentials are rejected). The next time Antora is run without the --fetch
flag, it will find this empty repository in the cache and use it. As a result, any pages that should have been discovered from the remote repository are absent.
The empty repository is completely valid and indistinguishable from a real empty repository. So Antora has no way of knowing that it's suppose to delete this empty repository and attempt to clone again. The solution is to clean up the empty repository when the clone fails so it doesn't get left there.
The current workaround to this problem is to add the --fetch
flag when running Antora. That will force Antora to make an attempt to retrieve updates from the upstream repository, even if the local repository is empty.