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

# Synchronisation GitHub

{% hint style="info" %}
Cette fonctionnalité a été développée par [ayaka-notes/overleaf-pro](https://github.com/ayaka-notes/overleaf-pro), modifiée par [yu-i-i/overleaf-cep](https://github.com/yu-i-i/overleaf-cep). Elle est introduite à partir de la v6.2.0 et des versions ultérieures. Elle est encore en version bêta. Nous avons besoin de vos retours si vous rencontrez un problème.
{% endhint %}

{% columns %}
{% column %}

<figure><img src="/files/5dae83e048d838142bb9ae0e95d644022c618bd6" alt=""><figcaption></figcaption></figure>

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

{% column %}

<figure><img src="/files/491f2f9b931df796c331e4e18ab822bb84d32ab0" alt=""><figcaption></figcaption></figure>

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

### Configurer la synchronisation GitHub

{% hint style="warning" %}
Vous devez activer [git-bridge](/on-premises/fr/configuration/overleaf-toolkit/git-integration.md) d'abord avant d'utiliser la synchronisation GitHub.

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

```dotenv
GIT_BRIDGE_ENABLED=true
```

{% endcode %}
{% endhint %}

Visitez [les paramètres développeur](https://github.com/settings/developers) pour créer votre application OAuth GitHub et copier votre `CLIENT_ID` et `SECRET`.&#x20;

**Notes**: votre URL de rappel OAuth est : `${OVERLEAF_SITE_URL}/user/github-sync/oauth2/callback`.

Ensuite, ajoutez les paramètres suivants à vos fichiers de variables d'environnement Overleaf.

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

```dotenv
# utilisé pour chiffrer le jeton d'accès GitHub de l'utilisateur.
# Comment le générer : `openssl rand -hex 32`
GITHUB_TOKEN_CIPHER_PASSWORD=0123456789ABCDEFG # à remplacer par le vôtre

# Paramètres de synchronisation GitHub
GITHUB_SYNC_ENABLED=true
GITHUB_SYNC_CLIENT_ID=
GITHUB_SYNC_CLIENT_SECRET=

# Le rappel OAuth est : ${OVERLEAF_SITE_URL}/user/github-sync/oauth2/callback
# (Facultatif) GITHUB_SYNC_PROXY_URL=http://10.0.0.1:10808
```

{% endcode %}

{% hint style="warning" %}
Avant de configurer l'URL de rappel OAuth GitHub, assurez-vous que `OVERLEAF_SITE_URL` est correctement défini.
{% endhint %}

Si vous vous trouvez en Chine continentale, vous devrez peut-être configurer un proxy pour accéder à GitHub. Définissez la variable d'environnement suivante : `GITHUB_SYNC_PROXY_URL=http://10.0.0.1:10808`.

{% hint style="warning" %}
N'utilisez pas `127.0.0.1` pour l'hôte du proxy. Si le proxy s'exécute sur le serveur hôte, utilisez l'adresse IP LAN du serveur (par exemple `192.168.1.xx`) et assurez-vous que le proxy est configuré pour accepter les connexions provenant des appareils du réseau local.
{% 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/fr/configuration/overleaf-toolkit/synchronisation-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.
