Este contenido no está disponible en el idioma seleccionado.

Chapter 1. Configuring GitHub for RHTAP


RHTAP uses GitHub to authenticate users. RHTAP also uses GitHub as the destination for repositories that it generates.

To enable this functionality, before installing RHTAP in your cluster, you must first complete the following procedures to configure GitHub for RHTAP:

  1. Creating a GitHub personal access token
  2. Creating a GitHub application
  3. (Optional) Forking the software catalog

1.1. Creating a GitHub personal access token

Before completing this procedure, you need to own a GitHub organization that you can use for RHTAP. This can be a new organization that you create, an organization you already own, or an existing organization for which you request ownership from the current admins. After installing RHTAP, this GitHub organization gives RHTAP users a place to create git repositories for their applications.

Once you own an organization, you are ready to follow the steps in this procedure to create a personal access token. You need this token to run a command that is covered in the next procedure.

Prerequisites:

  • Ownership of a GitHub organization

Procedure:

  1. Go to your Developer Settings page in GitHub.
  2. In the left panel, under Personal access tokens, select Tokens (classic).
  3. From the Generate new token drop down menu under the page banner, select Generate new token (classic). You may need to authenticate to continue.
  4. Enter a name, select an expiration date, and under Select scopes, select repo (which should automatically include all scopes from repo: status to security_events).
  5. Select Generate token. GitHub redirects you to a new page, where your token is visible. Create a new file called private.env, and save this token in that file.

    Note

    The private.env is critical to the success of your installation. Please ensure you create this file and save it in a secure location.

1.2. Creating a GitHub application for RHTAP

Creating a GitHub application for RHTAP allows developers to authenticate to Red Hat Developer Hub, which is the user interface (UI) where they can interact with RHTAP. This GitHub application also allows RHTAP to access developer’s source code that is hosted on GitHub.

Keep in mind that you must create and install the new application in the GitHub organization that you are using for Red Hat Trusted Application Pipeline. RHTAP can subsequently create new repositories within that organization, to serve as the source code for the applications it builds.

Also be aware that this procedure directs you to pull and start running the installer container image. This installer allows you to automate much of the remaining installation process.

Prerequisites

  • A GitHub personal access token (from the previous procedure)
  • A container management tool on your workstation, such as Podman or Docker
  • Valid credentials for registry.redhat.io
  • ClusterAdmin access to an OpenShift cluster

Procedure

  1. In your CLI, authenticate to registry.redhat.io.

    $ podman login registry.redhat.io
  2. Pull the installer image.

    $ podman pull registry.redhat.io/rhtap-cli/rhtap-cli-rhel9:latest
  3. Start the rhtap-cli container image.

    $ podman run \
            -it \
            --entrypoint=bash \
            --publish 8228:8228 \
            --rm \
            rhtap-cli:latest
  4. In the running container, login to your OpenShift cluster as ClusterAdmin.

    bash-5.1$ oc login https://api.<input omitted>.openshiftapps.com:443 --username cluster-admin --password <input omitted>
  5. Run the following command to start creating a GitHub application. Replace $GH_TOKEN with the token you created in the previous procedure. Replace $GH_ORG_NAME with the name of the GitHub organization you are using for RHTAP. Replace $GH_APP_NAME with a name you would like to use for your application.

    bash-5.1$ rhtap-cli integration github-app --create --token="$GH_TOKEN" --org="$GH_ORG_NAME" $GH_APP_NAME
  6. The output of this command includes a URL. Use your web browser on your workstation to navigate to this address. When prompted, click Create your GitHub App.
  7. The button redirects you to GitHub. If necessary, authenticate in GitHub to confirm access. Then click Create GitHub App for <your organization’s name>.
  8. A new message displays in your browser, telling you that the app was successfully created. Click on the hyperlinked text to install the new application in your GitHub organization.
  9. The link redirects you to GitHub. Click the green Install button.
  10. Select the organization that you are using for RHTAP.
  11. When prompted, select All repositories, so RHTAP can create new repositories in your organization. Click the green Install button.

    Note

    You may want to keep this GitHub page open, although you can close it without interrupting installation. In the page banner, there is a link that you can use after installation to access RHTAP (beginning with https://backstage-developer-hub-rhtap…​).

1.3. (Optional) Forking the RHTAP catalog repository

RHTAP provides users with a set of software templates that enable developers to build applications more quickly. You may want to customize these templates, to tailor them to your users' specific needs. To enable this customization, you must fork the repository that contains the default templates now. In a later stage of the installation process, you can configure RHTAP to find software templates in your customizable fork, rather than in the default repository.

Procedure:

  1. In your web browser, navigate to the RHTAP software catalog repository.
  2. Beneath the banner of the page, select Fork and fork the repository.

    1. Uncheck the box that says "Copy the main branch only".
  3. Once the fork is ready, copy its address. Label and save it in private.env.
  4. In your new fork, beneath the banner, click main to open a dropdown menu. Under Tags, select the release that corresponds to the version of RHTAP that you are using.

    Note

    Be sure to update your fork from time to time, so updates from the upstream repository can benefit your instance of RHTAP.

Red Hat logoGithubredditYoutubeTwitter

Aprender

Pruebe, compre y venda

Comunidades

Acerca de la documentación de Red Hat

Ayudamos a los usuarios de Red Hat a innovar y alcanzar sus objetivos con nuestros productos y servicios con contenido en el que pueden confiar. Explore nuestras recientes actualizaciones.

Hacer que el código abierto sea más inclusivo

Red Hat se compromete a reemplazar el lenguaje problemático en nuestro código, documentación y propiedades web. Para más detalles, consulte el Blog de Red Hat.

Acerca de Red Hat

Ofrecemos soluciones reforzadas que facilitan a las empresas trabajar en plataformas y entornos, desde el centro de datos central hasta el perímetro de la red.

Theme

© 2026 Red Hat
Volver arriba