Katello deb repository public

Problem:
I am trying to add a Foreman/Katello hosted repository to /etc/apt/sources.list on a Ubuntu instance, if I add it as follows:
deb http://foremanhost/pulp/deb/Default_Organization/Library/custom/ubuntu_18_04/ubuntu_18_04_main/dists/default/ bionic main then run apt update it fails with:
E: The repository ‘http://foremanhost/pulp/deb/Default_Organization/Library/custom/ubuntu_18_04/ubuntu_18_04_main/dists/default bionic Release’ does not have a Release file

Is it possible to run Katello as this type of repository server? if yes then how can I fix this?

Expected outcome:
Run apt update with no errors.

Foreman and Proxy versions:
Foreman 2.4.0
Katello 4.0

Distribution and version:
Centos 7
Ubuntu 18.04 or 20.04

Yes, you can. The line in your sources needs to be like this:

deb http://foremanhost/pulp/deb/Default_Organization/Library/custom/ubuntu_18_04/ubuntu_18_04_main default all

Pulp3 is only configured to publish the repo under default release and all component. I think it will get addressed in a later version to also publish it so that you could use bionic main etc.

1 Like

I second the answer by @rgp, but want to add one more thing:
You say your /etc/apt/sources.list entry is:

deb http://foremanhost/pulp/deb/Default_Organization/Library/custom/ubuntu_18_04/ubuntu_18_04_main/dists/default/ bionic main

I think it should be:

deb http://foremanhost/pulp/deb/Default_Organization/Library/custom/ubuntu_18_04/ubuntu_18_04_main/ default all

That is, not only is there the default all vs bionic main issue already mentioned, but also your URL should point at the repo root and not a subfolder of the dists/ folder.

The PR adding structured publishing is here: Fixes #32393 - Add deb structured mode publishing by m-bucher · Pull Request #9306 · Katello/katello · GitHub

I didn’t point out that explicitly, but I did change the url to point to the repo root. My bad