> 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/ar/aliadadat/overleaf-toolkit/mzamnh-github.md).

# مزامنة GitHub

{% hint style="info" %}
هذه الميزة مطوَّرة بواسطة [ayaka-notes/overleaf-pro](https://github.com/ayaka-notes/overleaf-pro)، وتم تعديلها بواسطة [yu-i-i/overleaf-cep](https://github.com/yu-i-i/overleaf-cep). تم تقديمه ابتداءً من الإصدار v6.2.0 وما بعده. وما يزال في حالة تجريبية. نحتاج إلى ملاحظاتك إذا واجهت أي مشكلة.
{% endhint %}

{% columns %}
{% column %}

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

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

{% column %}

<figure><img src="/files/4dedc7df06da5fe348a7c106c916c22fafe77cdb" alt=""><figcaption></figcaption></figure>

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

### إعداد مزامنة GitHub

{% hint style="warning" %}
تحتاج إلى تفعيل [git-bridge](/on-premises/ar/aliadadat/overleaf-toolkit/git-integration.md) ذلك أولًا قبل استخدام مزامنة GitHub.

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

```dotenv
GIT_BRIDGE_ENABLED=true
```

{% endcode %}
{% endhint %}

قم بزيارة [إعدادات المطورين](https://github.com/settings/developers) لإنشاء تطبيق OAuth الخاص بك على GitHub، وانسخ `CLIENT_ID` و `SECRET`.&#x20;

**ملاحظات**: عنوان URL لردّ OAuth هو: `${OVERLEAF_SITE_URL}/user/github-sync/oauth2/callback`.

ثم أضف الإعدادات التالية إلى ملفات متغيرات البيئة الخاصة بـ Overleaf.

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

```dotenv
# يُستخدم لتشفير رمز وصول GitHub الخاص بالمستخدم.
# كيفية التوليد: `openssl rand -hex 32`
GITHUB_TOKEN_CIPHER_PASSWORD=0123456789ABCDEFG # غيّره إلى ما يخصّك

# إعدادات مزامنة GitHub
GITHUB_SYNC_ENABLED=true
GITHUB_SYNC_CLIENT_ID=
GITHUB_SYNC_CLIENT_SECRET=

# عنوان ردّ OAuth هو: ${OVERLEAF_SITE_URL}/user/github-sync/oauth2/callback
# (اختياري) GITHUB_SYNC_PROXY_URL=http://10.0.0.1:10808
```

{% endcode %}

{% hint style="warning" %}
قبل ضبط عنوان URL لردّ OAuth الخاص بـ GitHub، تأكد من أن `OVERLEAF_SITE_URL` مُعيَّن بشكل صحيح.
{% endhint %}

إذا كنت موجودًا في البرّ الرئيسي للصين، فقد تحتاج إلى إعداد وكيل للوصول إلى GitHub. عيّن متغير البيئة التالي: `GITHUB_SYNC_PROXY_URL=http://10.0.0.1:10808`.

{% hint style="warning" %}
لا تستخدم `127.0.0.1` كعنوان مضيف الوكيل. إذا كان الوكيل يعمل على الخادم المضيف، فاستخدم عنوان IP المحلي للخادم (مثل `192.168.1.xx`) وتأكد من أن الوكيل مُعدّ لقبول الاتصالات من الأجهزة الموجودة على الشبكة المحلية.
{% 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/ar/aliadadat/overleaf-toolkit/mzamnh-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.
