RHUI4 Log Error: "Relative path cannot begin or end with slashes." for Custom Repositories

Solution In Progress - Updated -

Issue

Clients can access Red Hat repositories but are unable to access custom repositories.
Errors were observed in /root/.rhui/rhui.log during custom repository creation via rhui-manager.

# rhui-manager
<snip>

 rhui (repo) => c

 Unique ID for the custom repository (alphanumerics, _, and - only):
 Custom_repo

 Display name for the custom repository [Custom_repo]:
 Custom_repo

 Unique path at which the repository will be served [Custom_repo]:
 custom/repo/

 Should the repository require an entitlement certificate to access? (y/n)
 y

 Should the repository require clients to perform a GPG check and
 verify packages are signed by a GPG key? (y/n)
 n

 The following repository will be created:
   ID:              Custom_repo
   Name:            Custom_repo
   Path:            custom/repo/
   GPG Check        No
   Red Hat GPG Key: No
 Proceed? (y/n) y
/root/.rhui/rhui.log 

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/rhui/tools/shell.py", line 94, in safe_listen
    self.listen(clear=first_run)
  File "/usr/lib/python3.6/site-packages/rhui/tools/shell.py", line 129, in listen
    Shell.listen(self)
  File "/usr/lib/python3.6/site-packages/rhui/common/shell.py", line 186, in listen
    item.func(*args, **item.kwargs)
  File "/usr/lib/python3.6/site-packages/rhui/tools/screens/repo.py", line 677, in create_custom
    gpg_keys, rh_gpg_key)
  File "/usr/lib/python3.6/site-packages/rhui/tools/pulp_api.py", line 598, in create_custom_repo
    return self._create_repo(repo_id, name, labels, notes, checksum_type)
  File "/usr/lib/python3.6/site-packages/rhui/tools/pulp_api.py", line 618, in _create_repo
    self.set_auto_distribution(repo_dict)
  File "/usr/lib/python3.6/site-packages/rhui/tools/pulp_api.py", line 1260, in set_auto_distribution
    task_href = api.create(distro).task
  File "/usr/lib/python3.6/site-packages/pulpcore/client/pulp_rpm/api/distributions_rpm_api.py", line 190, in create
    return self.create_with_http_info(rpm_rpm_distribution,  **kwargs)  # noqa: E501
  File "/usr/lib/python3.6/site-packages/pulpcore/client/pulp_rpm/api/distributions_rpm_api.py", line 283, in create_with_http_info
    collection_formats=collection_formats)
  File "/usr/lib/python3.6/site-packages/pulpcore/client/pulp_rpm/api_client.py", line 370, in call_api
    _preload_content, _request_timeout, _host)
  File "/usr/lib/python3.6/site-packages/pulpcore/client/pulp_rpm/api_client.py", line 189, in __call_api
    raise e
  File "/usr/lib/python3.6/site-packages/pulpcore/client/pulp_rpm/api_client.py", line 186, in __call_api
    _request_timeout=_request_timeout)
  File "/usr/lib/python3.6/site-packages/pulpcore/client/pulp_rpm/api_client.py", line 414, in request
    body=body)
  File "/usr/lib/python3.6/site-packages/pulpcore/client/pulp_rpm/rest.py", line 272, in POST
    body=body)
  File "/usr/lib/python3.6/site-packages/pulpcore/client/pulp_rpm/rest.py", line 225, in request
    raise ApiException(http_resp=r)
pulpcore.client.pulp_rpm.exceptions.ApiException: (400)
Reason: Bad Request
HTTP response headers: HTTPHeaderDict({'Server': 'gunicorn', 'Date': 'Thu, 19 Jun 2025 04:13:20 GMT', 'Connection': 'close', 'Content-Type': 'application/json', 'Vary': 'Accept, Cookie', 'Allow': 'GET, POST, HEAD, OPTIONS', 'X-Frame-Options': 'DENY', 'Content-Length': '65', 'X-Content-Type-Options': 'nosniff', 'Referrer-Policy': 'same-origin', 'Cross-Origin-Opener-Policy': 'same-origin', 'Correlation-ID': '94dde0a85c804c7d80ef87bb1c3a4bd5', 'Access-Control-Expose-Headers': 'Correlation-ID'})
HTTP response body: {"base_path":["Relative path cannot begin or end with slashes."]}

Environment

Red Hat Update Infrastructure 4

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content