> For the complete documentation index, see [llms.txt](https://ayakaleaf-pro.ayaka.space/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ayakaleaf-pro.ayaka.space/on-premises/pl/konfiguracja/overleaf-toolkit/github-synchronisation.md).

# Synchronizacja z GitHubem

{% hint style="info" %}
Ta funkcja została opracowana przez [ayaka-notes/overleaf-pro](https://github.com/ayaka-notes/overleaf-pro), zmodyfikowana przez [yu-i-i/overleaf-cep](https://github.com/yu-i-i/overleaf-cep). Zostało wprowadzone od wersji v6.2.0 wzwyż. Nadal ma status beta. Potrzebujemy Twojej opinii, jeśli napotkasz jakikolwiek problem.
{% endhint %}

{% columns %}
{% column %}

<figure><img src="/files/191debb7d15a8932237d02f8661b9ad23d4fb057" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/ac754e68f86c2510bb75a89d0f37c7e354bd1df8" alt=""><figcaption></figcaption></figure>
{% endcolumn %}

{% column %}

<figure><img src="/files/c14bed30b780a869b908affdb6fbfd4e34019f22" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/33254aebc8154b8f726c11d0f8d34a8f6e207172" alt=""><figcaption></figcaption></figure>
{% endcolumn %}
{% endcolumns %}

### Konfiguracja synchronizacji GitHub

{% hint style="warning" %}
Musisz włączyć [git-bridge](/on-premises/pl/konfiguracja/overleaf-toolkit/git-integration.md) najpierw przed użyciem synchronizacji GitHub.

{% code title="config/overleaf.rc" %}

```dotenv
GIT_BRIDGE_ENABLED=true
```

{% endcode %}
{% endhint %}

Odwiedź [ustawienia deweloperskie](https://github.com/settings/developers) aby utworzyć aplikację GitHub OAuth i skopiować swoje `CLIENT_ID` i `SECRET`.

**Uwagi**: Twój adres URL wywołania zwrotnego OAuth to: `${OVERLEAF_SITE_URL}/user/github-sync/oauth2/callback`.

Następnie dodaj następujące ustawienia do plików zmiennych środowiskowych Overleaf.

{% code title="config/variables.env" overflow="wrap" %}

```dotenv
# używane do szyfrowania tokenu dostępu GitHub użytkownika.
# Jak wygenerować: `openssl rand -hex 32`
GITHUB_TOKEN_CIPHER_PASSWORD=0123456789ABCDEFG # zmień na swój

# Ustawienia synchronizacji GitHub
GITHUB_SYNC_ENABLED=true
GITHUB_SYNC_CLIENT_ID=
GITHUB_SYNC_CLIENT_SECRET=

# Adres URL wywołania zwrotnego OAuth to: ${OVERLEAF_SITE_URL}/user/github-sync/oauth2/callback
# (Opcjonalnie) GITHUB_SYNC_PROXY_URL=http://10.0.0.1:10808
```

{% endcode %}

{% hint style="warning" %}
Zanim skonfigurujesz adres URL wywołania zwrotnego OAuth GitHub, upewnij się `OVERLEAF_SITE_URL` że jest ustawiony poprawnie.
{% endhint %}

Jeśli znajdujesz się w Chinach kontynentalnych, możesz potrzebować skonfigurować proxy, aby uzyskać dostęp do GitHub. Ustaw następującą zmienną środowiskową: `GITHUB_SYNC_PROXY_URL=http://10.0.0.1:10808`.

{% hint style="warning" %}
Nie używaj `127.0.0.1` jako hosta proxy. Jeśli proxy działa na serwerze hosta, użyj adresu LAN serwera (np. `192.168.1.xx`) i upewnij się, że proxy jest skonfigurowane do przyjmowania połączeń z urządzeń w sieci lokalnej.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://ayakaleaf-pro.ayaka.space/on-premises/pl/konfiguracja/overleaf-toolkit/github-synchronisation.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
