Frecuentemente publicamos actualizaciones de nuestra documentación. Es posible que la traducción de esta página esté en curso. Para conocer la información más actual, visita la documentación en inglés. Si existe un problema con las traducciones en esta página, por favor infórmanos.
Versión del artículo: Enterprise Server 2.20

Installing GitHub Insights

You can install GitHub Insights and connect the standalone application to GitHub Enterprise Server.

Organization owners in GitHub Enterprise with read permissions to the github/insights-releases repository and administrative access to the application server can install GitHub Insights.

GitHub Insights is available with GitHub One. Para obtener más información, consulta "Productos de GitHub".

En este artículo

Prerrequisitos

  • You must have a GitHub Enterprise license file that includes GitHub Insights. After you purchase GitHub Insights, you can download the updated license file in the GitHub Enterprise web portal.

  • GitHub Insights requires a machine, called the application server, hosted either in the cloud or locally. For more information, see "System overview for GitHub Insights."

  • You must install dependencies on the application server.

    Note: The application server may require the Docker daemon to be run as sudo. Kubernetes is not supported.

Crear una App GitHub

To connect GitHub Insights to GitHub Enterprise, you must create a App GitHub in an organization on GitHub Enterprise. A slugged version of your app's name will be shown on GitHub Enterprise when your integration takes an action.

  1. Sign in to tu instancia de servidor de GitHub Enterprise at http(s)://HOSTNAME/login.

  2. Navigate to the organization you'd like to connect to GitHub Insights.

  3. Under your organization name, click Settings.

    Organization settings button

  4. En la barra lateral izquierda, haz clic en App GitHubs.

    App GitHubs settings

  5. Click New App GitHub.

    New GitHub App button

  6. Under "App GitHub name", type a name for the app. Your app cannot have the same name as an existing user or organization, unless the name is your own user or organization name.

    GitHub App name field

  7. Under "Homepage URL", type the URL of the application server for GitHub Insights. For more information, see "System overview for GitHub Insights."

    Homepage URL field

  8. Under "User authorization callback URL", type the following, replacing <application-server-url> with the URL of the application server.

    <application-server-url>/public/applogin
    

    User authorization callback field

  9. Under "Setup URL", type <application-server-url>/public/setup.

    Setup URL field

  10. Under "Webhook URL", type <application-server-url>/webhooks.

    Webhook URL field

  11. Under "Webhook secret", type a secret, then record the secret for later reference.

    Webhook secret field

  12. Under "Permissions", use the drop-down menus and configure the following permissions for the app.

    • Repositorio:
      • Contents: Read-only
      • Metadata: Read-only
      • Pull requests: Read-only
      • Commit statuses: Read-only
    • Organización:
      • Members: Read-only
      • Projects: Read-only

    Permissions drop-down menus

  13. Under "Subscribe to events", select:

    • Solicitud de extracción
    • Subir
    • Repository
      Subscribe to events checkboxes
  14. To enable the App GitHub to access data from any user or organization in tu instancia de servidor de GitHub Enterprise, under "Where can this App GitHub be installed?", select Any account.

    Radio buttons to enable access to any account

  15. Click Create App GitHub.

    Create GitHub App button

  16. Review your app's configuration.

  17. Under "Private keys", click Generate a private key.

    Generate a private key button

  18. Save the resulting PEM file for later reference.

  19. Make note of the following information about your app for later reference.

    • App ID
    • Client ID
    • Client secret
    • Private key
    • Webhook secret

Instalar GitHub Insights

  1. From the application server, navigate to the latest release of GitHub Insights on the Releases page for github/insights-releases.
  2. To download the latest release, under "Assets", click insights-VERSION.tar.gz.
    Installation assset
  3. Unzip the directory.
  4. Run the shell script install.sh.
  5. To enable SSL, enter the SSL Cert (.crt/.cer/.pem). If you don't want to enable SSL, leave blank.
  6. If you chose to enable SSL, enter the SSL Key (.key). Otherwise, leave blank.
  7. Enter the hostname, which is the same URL you used for the application server when creating the App GitHub.
  8. The installation will take a few minutes to run. When complete, you will see a message printed to the terminal.
    Installation complete
    Run /opt/insights/scripts/start.sh to start GitHub Insights
    
  9. To start GitHub Insights, run the shell script /opt/insights/scripts/start.sh.
  10. If this is the first time starting GitHub Insights the script will take a few minutes to run. When complete, you will see a message printed to the terminal.
    GitHub Insights is running!
    

Configurar GitHub Insights

To configure GitHub Insights to connect to GitHub Enterprise Server, you must provide the information you recorded in previous steps.

  1. In your browser, navigate to <application-server-url>/setup.
  2. Under "GitHub API URL", type the URL you use to access GitHub Enterprise.
    GitHub Enterprise API URL field
  3. Under "GitHub Insights License", click "Choose Files", then upload your GitHub Enterprise license file.
    Choose Files button
  4. Under "App ID", type the App ID of your App GitHub, which you recorded when creating the app.
    App ID field
  5. Under "Client ID", type the client ID of your App GitHub, which you recorded when creating the app.
    Client ID field
  6. Under "Client Secret", type the client secret of your App GitHub, which you recorded when creating the app.
    Client secret field
  7. Under "Private Key", type in the private key of your App GitHub, which is contained in the PEM file you downloaded while creating the app.
    Private key field
  8. Under "Webhook Secret", type the webhook secret of your App GitHub, which you recorded when creating the app.
    Webhook secret field
  9. If you did not provide a SSL certificate during installation, select Skip SSL Certificate Check.
    Checkbox to skip SSL certificate check
  10. Haz clic en Submit (Enviar).
  11. Click Log in with GitHub.
  12. To authorize the App GitHub and access GitHub Insights, click Authorize App GitHub.

Leer más

Pregunta a una persona

¿No puedes encontrar lo que estás buscando?

Contáctanos