15.5. Downloading Files to a Host From a Custom File Type Repository in Red Hat Satellite

You can download files to a client over HTTPS using curl -O, and optionally over HTTP if the Publish via HTTP repository option is selected.

Prerequisites

Procedure

To download files to a host from a custom file type repository, complete the following procedure:

  1. In the Satellite web UI, navigate to Content > Products.
  2. Select a custom product by name.
  3. Select a file type repository by name.
  4. Check to see if Publish via HTTP is enabled. If it is not, you require the certificates to use HTTPS.
  5. Copy the URL where the repository is published.

For CLI Users

  1. List the file type repositories.

    # hammer repository list --content-type file
    ---|----------|-----------------|--------------|----
    ID | NAME     | PRODUCT         | CONTENT TYPE | URL
    ---|----------|-----------------|--------------|----
    7  | My Files | My File Product | file         |
    ---|----------|-----------------|--------------|----
  2. Display the repository information.

    # hammer repository info --name "My Files" --product "My File Product" --organization-id 1

    If HTTP is enabled, the output is similar to this:

    Publish Via HTTP:   yes
    Published At:       http://satellite.example.com/pulp/isos/uuid/

    If HTTP is not enabled, the output is similar to this:

    Publish Via HTTP:   no
    Published At:       https://satellite.example.com/pulp/isos/uuid/
  3. On the client, enter a command in the appropriate format for HTTP or HTTPS:

    For HTTP:

    # curl -O satellite.example.com/pulp/isos/uuid/my_file

    For HTTPS:

    # curl -O --cert ./Default\ Organization-key-cert.pem --cacert katello-server-ca.crt satellite.example.com/pulp/isos/uuid/my_file