I can download a release file at https://apt-archive.postgresql.org/pub/repos/apt/dists/jammy-pgdg-archive/InRelease.
This suggests that the problem is nothing to do with appending index.html to folder URLs for browsing.
What is meant to happen, is that pulp_deb attempts to download each of Release, InRelease, and Release.gpg from https://apt-archive.postgresql.org/pub/repos/apt/dists/jammy-pgdg-archive/index.html. In the case of this server only InRelease exists. That alone would not be a problem, since this is expected and pulp_deb should just ignore the artifacts it cannot download (so long as at least one of Release or InRelease exists). However, instead of returning 404 the files that do not exist return 403, and I suspect this causes the sync to fail (instead of simply continuing). I would need to look at the download code to be sure, but for now this is the theory I am going with.
@lgasperment Feel free to open an issue at https://github.com/pulp/pulp_deb/issues
Ideally add the commands you used to create your remmote and also the full output of the failed sync task. And be sure to link to this thread.
I cannot think of a workaround that does not require patching code. For example, one might drop the Release and Release.gpg from this list: pulp_deb/pulp_deb/app/models/content/verbatim_metadata.py at bc9612dba880e3efd2f5b2c93b9f025dec68ad15 ¡ pulp/pulp_deb ¡ GitHub
That should fix synchronization of this repo, but will break synchronization of any repos that do need Release and/or Release.gpg to be downloaded.