I created the repo like this:
hammer repository create \
--content-type "file" \
--name "Louis-Ops-Custom-Repo_Local" \
--product Louis \
--publish-via-http 1 \
--url "file:///var/lib/pulp/local_repos/Louis-Ops-Custom-Repo" \
--organization-title Louis-TM
And for the local file repo part:
dnf -y install pulp-manifest
mkdir -p /var/lib/pulp/local_repos/Louis-Ops-Custom-Repo
foreman-installer --foreman-proxy-content-pulpcore-additional-import-paths /var/lib/pulp/local_repos
touch /var/lib/pulp/local_repos/Louis-Ops-Custom-Repo/test.txt
pulp-manifest /var/lib/pulp/local_repos/Louis-Ops-Custom-Repo
I put files in it and Synced the repo.
Then I look at the repo and get this:
[root@gp2us1opsfm01-main02a ~]# hammer repository info --name Louis-Ops-Custom-Repo_Local --organization-title Louis-TM --product Louis
Id: 767
Name: Louis-Ops-Custom-Repo_Local
Label: Louis-Ops-Custom-Repo_Local
Description:
Organization: Louis-TM
Red Hat Repository: no
Content Type: file
Content Label: Louis-TM_Louis_Louis-Ops-Custom-Repo_Local
Mirroring Policy: Content Only
Url: file:///var/lib/pulp/local_repos/Louis-Ops-Custom-Repo
Publish Via HTTP: yes
Published At: https://gp2us1opsfm01-main02a.example.net/pulp/content/Louis-TM/Library/custom/Louis/Louis-Ops-Custom-Repo_Local/
Relative Path: Louis-TM/Library/custom/Louis/Louis-Ops-Custom-Repo_Local
Container Repository Name: tds-tm-tds-tds-ops-custom-repo_local
Publish Settings:
Restrict to architecture: No restriction
Restrict to OS Version: No restriction
HTTP Proxy:
HTTP Proxy Policy: global_default_http_proxy
Product:
Id: 118
Name: Louis
GPG Key:
Sync:
Status: Not Synced
Created: 2024/10/07 20:05:35
Updated: 2024/10/07 20:05:36
Content Counts:
Files: 0
So that repo is NOT doing HTTP but HTTPs even though I configured it with --publish-via-http 1.
Here is what happens if I try to download:
[root@LouisNewTest-HOST01 ~]# wget --no-check-certificate https://gp2us1opsfm01-main02a.example.net/pulp/content/Louis-TM/Library/custom/Louis/Louis-Ops-Custom-Repo_Local/prep_unused_disk_louis.sh
--2024-10-08 12:04:30-- https://gp2us1opsfm01-main02a.example.net/pulp/content/Louis-TM/Library/custom/Louis/Louis-Ops-Custom-Repo_Local/prep_unused_disk_louis.sh
Resolving gp2us1opsfm01-main02a.example.net (gp2us1opsfm01-main02a.example.net)... 10.102.68.148
Connecting to gp2us1opsfm01-main02a.example.net (gp2us1opsfm01-main02a.example.net)|10.102.68.148|:443... connected.
WARNING: The certificate of ‘gp2us1opsfm01-main02a.example.net’ is not trusted.
WARNING: The certificate of ‘gp2us1opsfm01-main02a.example.net’ hasn't got a known issuer.
HTTP request sent, awaiting response... 404 Not Found
2024-10-08 12:04:31 ERROR 404: Not Found.
I get the same result if I try to download with HTTP too.
I am on Foreman 3.11.2