> For the complete documentation index, see [llms.txt](https://overleaf-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://overleaf-pro.ayaka.space/on-premises/pl/konfiguracja/overleaf-toolkit/synchronizacja-z-github.md).

# Synchronizacja z GitHub

{% hint style="info" %}
Ta funkcja jest rozwijana przez [ayaka-notes/overleaf-pro](https://github.com/ayaka-notes/overleaf-pro), zmodyfikowane przez [yu-i-i/overleaf-cep](https://github.com/yu-i-i/overleaf-cep). Jest dostępne od wersji v6.2.0 i nowszych. Wciąż ma status beta. Potrzebujemy Twojej opinii, jeśli napotkasz jakikolwiek problem.
{% endhint %}

{% columns %}
{% column %}

<figure><img src="/files/4a5d5b6c7ffecf8ab06cb0dd9a47ac98cbb5d1e5" 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 %}

### Skonfiguruj synchronizację 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ć swój `CLIENT_ID` i `SECRET`.&#x20;

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

Następnie dodaj poniższe 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 zwrotny 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" %}
Przed skonfigurowaniem adresu URL zwrotnego OAuth GitHub upewnij się `OVERLEAF_SITE_URL` jest ustawiony poprawnie.
{% endhint %}

Jeśli znajdujesz się w Chinach kontynentalnych, może być konieczna konfiguracja 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 IP LAN serwera (np. `192.168.1.xx`) i upewnij się, że proxy jest skonfigurowane tak, aby akceptowało połączenia 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://overleaf-pro.ayaka.space/on-premises/pl/konfiguracja/overleaf-toolkit/synchronizacja-z-github.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.
