> 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/id/konfigurasi/overleaf-toolkit/github-synchronisation.md).

# Sinkronisasi GitHub

{% hint style="info" %}
Fitur ini dikembangkan oleh [ayaka-notes/overleaf-pro](https://github.com/ayaka-notes/overleaf-pro), dimodifikasi oleh [yu-i-i/overleaf-cep](https://github.com/yu-i-i/overleaf-cep). Ini diperkenalkan mulai v6.2.0 dan seterusnya. Ini masih berstatus beta. Kami memerlukan masukan Anda jika ada masalah.
{% endhint %}

{% columns %}
{% column %}

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

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

{% column %}

<figure><img src="/files/9bb4faf7fd6e73d2c154a5494559849a0986724c" alt=""><figcaption></figcaption></figure>

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

### Atur Sinkronisasi GitHub

{% hint style="warning" %}
Anda perlu mengaktifkan [git-bridge](/on-premises/id/konfigurasi/overleaf-toolkit/git-integration.md) terlebih dahulu sebelum menggunakan Sinkronisasi GitHub.

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

```dotenv
GIT_BRIDGE_ENABLED=true
```

{% endcode %}
{% endhint %}

Kunjungi [pengaturan pengembang](https://github.com/settings/developers) untuk membuat aplikasi OAuth GitHub Anda, dan salin `CLIENT_ID` dan `SECRET`.

**Catatan**: URL callback OAuth Anda adalah: `${OVERLEAF_SITE_URL}/user/github-sync/oauth2/callback`.

Kemudian, tambahkan pengaturan berikut ke file variabel env overleaf Anda.

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

```dotenv
# digunakan untuk mengenkripsi token akses GitHub pengguna.
# Cara membuat: `openssl rand -hex 32`
GITHUB_TOKEN_CIPHER_PASSWORD=0123456789ABCDEFG # diubah menjadi milik Anda

# Pengaturan Sinkronisasi Github
GITHUB_SYNC_ENABLED=true
GITHUB_SYNC_CLIENT_ID=
GITHUB_SYNC_CLIENT_SECRET=

# Callback OAuth adalah: ${OVERLEAF_SITE_URL}/user/github-sync/oauth2/callback
# (Opsional) GITHUB_SYNC_PROXY_URL=http://10.0.0.1:10808
```

{% endcode %}

{% hint style="warning" %}
Sebelum mengonfigurasi URL callback OAuth GitHub, pastikan `OVERLEAF_SITE_URL` sudah disetel dengan benar.
{% endhint %}

Jika Anda berada di daratan Tiongkok, Anda mungkin perlu mengonfigurasi proxy untuk mengakses GitHub. Setel variabel lingkungan berikut: `GITHUB_SYNC_PROXY_URL=http://10.0.0.1:10808`.

{% hint style="warning" %}
Jangan gunakan `127.0.0.1` untuk host proxy. Jika proxy berjalan di server host, gunakan alamat IP LAN server (seperti `192.168.1.xx`) dan pastikan proxy dikonfigurasi untuk menerima koneksi dari perangkat di jaringan lokal.
{% 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/id/konfigurasi/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.
