{% extends "setup/layout.html" %} {% block content %}
{% set selected_auth_mode = auth_mode if auth_mode is defined else ("personal_token" if (local_mode or (state and state.installation_mode == "local_dev")) else "app") %}

Step 4 of {{ total_steps }} (optional)

GitHub Access

{% if local_mode %}

Connect your GitHub account so Governor can read source files and create pull requests. You can skip this and add it later from Settings.

{% else %}

Connect GitHub so Governor can fetch repository files and create pull requests. Skip this step to run in detection-only mode — you can configure it later in Admin settings.

{% endif %}
{% if errors and errors.github %}
{{ errors.github }}
{% endif %} {% if errors and errors.network %}
GitHub unreachable: {{ errors.network }}
{% endif %}
{% if local_mode %} {# Local mode: PAT only, no GitHub App option #} {% else %}
{% endif %}
{% if errors and errors.app_id %}

{{ errors.app_id }}

{% endif %}
{% if errors and errors.installation_id %}

{{ errors.installation_id }}

{% endif %}
{% if errors and errors.private_key %}

{{ errors.private_key }}

{% endif %}

How to create a token:

  1. Go to github.com/settings/tokens
  2. Click Generate new token (classic)
  3. Name it Governor, set expiration as needed
  4. Select scope: repo (full control of private repositories)
  5. Click Generate token and paste it below
{% if errors and errors.personal_access_token %}

{{ errors.personal_access_token }}

{% endif %}
{% if retry is defined and retry %}

The connectivity check failed due to a network error. Check your connection and try again.

{% endif %}
{% endblock %}