> 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/es/configuracion/overleaf-toolkit/sincronizacion-con-github.md).

# Sincronización con GitHub

{% hint style="info" %}
Esta función fue desarrollada por [ayaka-notes/overleaf-pro](https://github.com/ayaka-notes/overleaf-pro), modificada por [yu-i-i/overleaf-cep](https://github.com/yu-i-i/overleaf-cep). Se introdujo a partir de la v6.2.0 y posteriores. Aún está en estado beta. Necesitamos tus comentarios si tienes algún problema.
{% endhint %}

{% columns %}
{% column %}

<figure><img src="/files/026a21d7469629c50daff2f9ee3686d09229fac1" alt=""><figcaption></figcaption></figure>

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

{% column %}

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

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

### Configurar la sincronización de GitHub

{% hint style="warning" %}
Debes habilitar [git-bridge](/on-premises/es/configuracion/overleaf-toolkit/git-integration.md) primero antes de usar la sincronización de GitHub.

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

```dotenv
GIT_BRIDGE_ENABLED=true
```

{% endcode %}
{% endhint %}

Visita [configuración para desarrolladores](https://github.com/settings/developers) para crear tu aplicación OAuth de GitHub y copiar tu `CLIENT_ID` y `SECRETO`.&#x20;

**Notas**: tu URL de devolución de llamada OAuth es: `${OVERLEAF_SITE_URL}/user/github-sync/oauth2/callback`.

Luego, añade la siguiente configuración a tus archivos de variables de entorno de Overleaf.

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

```dotenv
# se usa para cifrar el token de acceso de GitHub del usuario.
# Cómo generarlo: `openssl rand -hex 32`
GITHUB_TOKEN_CIPHER_PASSWORD=0123456789ABCDEFG # cámbialo por el tuyo

# Configuración de sincronización de GitHub
GITHUB_SYNC_ENABLED=true
GITHUB_SYNC_CLIENT_ID=
GITHUB_SYNC_CLIENT_SECRET=

# La devolución de llamada OAuth es: ${OVERLEAF_SITE_URL}/user/github-sync/oauth2/callback
# (Opcional) GITHUB_SYNC_PROXY_URL=http://10.0.0.1:10808
```

{% endcode %}

{% hint style="warning" %}
Antes de configurar la URL de devolución de llamada OAuth de GitHub, asegúrate de que `OVERLEAF_SITE_URL` esté configurado correctamente.
{% endhint %}

Si te encuentras en China continental, es posible que necesites configurar un proxy para acceder a GitHub. Establece la siguiente variable de entorno: `GITHUB_SYNC_PROXY_URL=http://10.0.0.1:10808`.

{% hint style="warning" %}
No uses `127.0.0.1` como host del proxy. Si el proxy se está ejecutando en el servidor anfitrión, usa la IP LAN del servidor (como `192.168.1.xx`) como dirección y asegúrate de que el proxy esté configurado para aceptar conexiones de dispositivos en la red 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/es/configuracion/overleaf-toolkit/sincronizacion-con-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.
