{% extends "base.html" %} {% block content %}

GitHub Configuration

Configure GitHub integration to clone and sync repositories

Authentication Status
{% if github_configured %} Connected {% else %} Not configured {% endif %}
{% if github_configured %}
Token aktywny {% if github_user %} — zalogowany jako {{ github_user }}{% endif %} {% if github_token_hint %}
Token: {{ github_token_hint }}{% endif %}
{% endif %} {% if cli_fetch_result %} {% if cli_fetch_result.success %}
Token pobrany z gh CLI — zapisany do .env {% if cli_fetch_result.user %}
{{ cli_fetch_result.user }}{% endif %}
{% else %}
{{ cli_fetch_result.error }}
{% endif %} {% endif %}

Opcja 1 — pobierz token z gh CLI (zalecane)

Jeśli masz zainstalowane gh i jesteś zalogowany (gh auth login), kliknij poniżej — gh2mcp-agent pobierze token i zapisze go do .env.

Nie masz gh CLI? Zainstaluj, potem: gh auth login

Opcja 2 — wpisz Personal Access Token

Utwórz token na github.com/settings/tokens z zakresem repo (i opcjonalnie delete_repo).
{% if github_configured %} {% endif %}
Instrukcja konfiguracji
Metoda A — gh CLI (najszybsza)
# 1. Zainstaluj gh CLI (raz)
# https://cli.github.com/

# 2. Zaloguj się
gh auth login

# 3. Kliknij "Pobierz token z gh CLI" powyżej
# lub w terminalu:
make setup-github
Metoda B — Personal Access Token
  1. Wejdź na github.com/settings/tokens
  2. Kliknij Generate new token (classic)
  3. Zaznacz scope: repo + delete_repo (opcjonalnie)
  4. Skopiuj token i wklej w Opcji 2
Metoda C — zmienna środowiskowa
echo "GITHUB_PAT=ghp_xxx" >> .env
# lub
export GITHUB_PAT=ghp_xxx
make restart
Token jest zapisywany do .env jako GITHUB_PAT i współdzielony między mcp-gateway i mcp-webui.
Create New Repository on GitHub
{% if not github_configured %}
Configure GitHub token above before creating repositories.
{% endif %}
{% if create_result %}
{% if create_result.success %}
Repository created: {{ create_result.github_repo }}
{{ create_result.html_url }} {% if create_result.repo_id %}
Sklonowano lokalnie jako: {{ create_result.repo_id }}View in Repos {% endif %}
{% else %}
Create failed: {{ create_result.error }}
{% endif %}
{% endif %}
Clone Repository from GitHub
Examples: semcod/mcp, microsoft/vscode
Unique identifier for this repo
{% if clone_result %}
{% if clone_result.success %}
Repository cloned successfully!
{{ clone_result.repo_id }}View in Repos
{% else %}
Clone failed: {{ clone_result.error }}
{% endif %}
{% endif %}
Sync Repository
{% if sync_result %}
{% if sync_result.success %}
Repository synced: {{ sync_result.message }}
{% else %}
Sync failed: {{ sync_result.error }}
{% endif %}
{% endif %}
{% if my_repos %}
Your GitHub Repositories
{% for repo in my_repos %} {% endfor %}
Repository Description Actions
{{ repo.name }}
{{ repo.url }}
{{ repo.description or '-' }}
{% endif %}
Environment Variables
Variable Description Status
GITHUB_PAT GitHub Personal Access Token {% if github_configured %} Set {% else %} Not set {% endif %}
GITHUB_USER GitHub username {% if github_user %} {{ github_user }} {% else %} Optional {% endif %}
{% endblock %}