> ## Documentation Index
> Fetch the complete documentation index at: https://ayakaleaf-pro.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Gitea 동기화

> Gitea 계정을 연결하고, 프로젝트를 가져오거나 내보내고, 변경 사항을 양방향으로 동기화하고, 연결을 해제합니다.

프로젝트를 Gitea 저장소에 연결하세요. 변경 사항은 양방향으로 이동하며, **Sync**를 클릭할 때만 이동합니다. 자동으로 동기화되는 것은 없습니다.

> [!NOTE]
>
> 먼저 관리자가 [Gitea 동기화](https://ayakaleaf-pro.mintlify.site/ko/on-premises/configuration/overleaf-toolkit/integrations/gitea-synchronisation.md)를 켜야 합니다.

## Gitea 계정 연결하기

이 작업은 한 번만 합니다.

**1. 계정 설정 열기**

**Account**를 클릭한 다음 **Account settings**를 클릭합니다. **Project synchronisation** 아래에서 **Gitea**를 찾아 **Link**를 클릭합니다.

![Link 버튼이 있는 계정 설정의 Gitea 섹션](https://mintcdn.com/ayakaleaf-pro/IsGnx0wnzqtV4hI8/images/on-premises/gitea-sync-link.png?fit=max\&auto=format\&n=IsGnx0wnzqtV4hI8\&q=85\&s=5514bcd66b524c3dde2376db09935feb)

계정 설정의 Gitea

**2. Gitea에서 승인**

Gitea가 열립니다. 요청을 받으면 로그인한 다음 애플리케이션을 승인합니다.

**3. 연결 확인**

계정 설정으로 돌아옵니다. Gitea 계정이 연결되었다는 녹색 메시지가 표시되고, 이제 버튼에 **Unlink**가 표시됩니다.

![Unlink 버튼이 있는 계정 설정의 Gitea 섹션](https://mintcdn.com/ayakaleaf-pro/IsGnx0wnzqtV4hI8/images/on-premises/gitea-sync-linked.png?fit=max\&auto=format\&n=IsGnx0wnzqtV4hI8\&q=85\&s=b0eb94a11ff546a6770d4f5a8b5250de)

Gitea 계정이 연결됨

계정이 아직 연결되지 않았다면 **Import from Gitea**와 편집기의 **Gitea** 카드가 먼저 연결하라고 요청합니다. **Link to your Gitea account**를 클릭하세요. 이 경우에도 계정 설정으로 이동하며, 편집기에서 시작했다면 새 탭에서 열립니다. 그런 다음 돌아가서 다시 시작하세요.

![Link to your Gitea account 버튼이 있는 Import from Gitea 대화 상자](https://mintcdn.com/ayakaleaf-pro/IsGnx0wnzqtV4hI8/images/on-premises/gitea-sync-link-prompt.png?fit=max\&auto=format\&n=IsGnx0wnzqtV4hI8\&q=85\&s=b9f6e8fc7d3aa2d3328423f660de5a9c)

계정이 연결되지 않았을 때의 안내

## 저장소 가져오기

Gitea 저장소에서 새 프로젝트를 만들며, 이 프로젝트는 이미 해당 저장소에 연결되어 있습니다.

**1. 가져오기 대화 상자 열기**

프로젝트 페이지에서 **New project**를 클릭한 다음 **Import from Gitea**를 클릭합니다.

![Import from Gitea가 있는 New project 메뉴](https://mintcdn.com/ayakaleaf-pro/IsGnx0wnzqtV4hI8/images/on-premises/gitea-sync-new-project-menu.png?fit=max\&auto=format\&n=IsGnx0wnzqtV4hI8\&q=85\&s=de3258081da7ec5af1083ae6c127d510)

New project 메뉴

**2. 저장소 선택**

저장소 옆의 **Import to Overleaf**를 클릭합니다. 목록에는 내 저장소와 내가 속한 조직의 저장소가 포함됩니다. 빈 저장소는 나열되지 않으며, 커밋이 하나 이상 있어야 합니다.

![저장소 네 개가 나열된 Import from Gitea 대화 상자](https://mintcdn.com/ayakaleaf-pro/IsGnx0wnzqtV4hI8/images/on-premises/gitea-sync-import.png?fit=max\&auto=format\&n=IsGnx0wnzqtV4hI8\&q=85\&s=9b8c86ed6705efddab590e0e8f62892c)

내 Gitea 저장소

**3. 프로젝트 확인**

새 프로젝트가 저장소의 파일과 함께 열립니다.

![가져온 프로젝트의 파일과 컴파일된 PDF를 보여 주는 편집기](https://mintcdn.com/ayakaleaf-pro/IsGnx0wnzqtV4hI8/images/on-premises/gitea-sync-imported.png?fit=max\&auto=format\&n=IsGnx0wnzqtV4hI8\&q=85\&s=bd72f7c7594e0f80e0966d4691598db3)

가져온 프로젝트

## 프로젝트를 새 저장소로 내보내기

프로젝트에서 저장소를 만들고 둘을 연결합니다. 프로젝트는 이 방법이나 가져오기로만 연결할 수 있으며, 이미 존재하는 저장소에는 연결할 수 없습니다.

**1. 편집기에서 Gitea 열기**

프로젝트를 엽니다. 왼쪽 막대에서 **Integrations**를 클릭한 다음 **Gitea**를 클릭합니다.

![Gitea 카드가 있는 Integrations 패널](https://mintcdn.com/ayakaleaf-pro/IsGnx0wnzqtV4hI8/images/on-premises/gitea-sync-integrations.png?fit=max\&auto=format\&n=IsGnx0wnzqtV4hI8\&q=85\&s=12710e50eecf8f3b385565c85b4a45a4)

Integrations 패널

**2. 저장소 정보 입력**

**Owner**를 선택합니다. 본인 또는 내가 속한 조직 중 하나를 선택할 수 있습니다. 조직을 선택하면 이 필드의 이름이 **Organization**이 됩니다. **Repository Name**의 초기값은 프로젝트 이름입니다. Gitea는 공백을 허용하지 않으므로, 이름에 공백이 있으면 바꾸세요. 설명은 선택 사항이며, **Private**가 기본으로 선택되어 있습니다. **Create a Gitea repository**를 클릭합니다.

![입력이 완료된 Export Project to Gitea 양식](https://mintcdn.com/ayakaleaf-pro/IsGnx0wnzqtV4hI8/images/on-premises/gitea-sync-export.png?fit=max\&auto=format\&n=IsGnx0wnzqtV4hI8\&q=85\&s=867cf2d205d151a87dd35529b4e40d56)

Export Project to Gitea

이름에 공백이 있거나 이미 사용 중이면 대화 상자에 \*\*Please check that the repository name is valid, and that you have permission to create the repository.\*\*가 표시됩니다. 이름을 바꾸고 버튼을 다시 클릭하세요.

**3. 연결 확인**

이제 대화 상자에 **This project is linked to**와 저장소 이름이 표시됩니다.

![내보내기 후의 Sync with Gitea 대화 상자](https://mintcdn.com/ayakaleaf-pro/IsGnx0wnzqtV4hI8/images/on-premises/gitea-sync-exported.png?fit=max\&auto=format\&n=IsGnx0wnzqtV4hI8\&q=85\&s=aa8d526d60f9733ba1885e73621ab8d6)

프로젝트가 연결됨

## 동기화하기

**1. 동기화 대화 상자 열기**

연결된 프로젝트를 엽니다. 왼쪽 막대에서 **Integrations**를 클릭한 다음 **Gitea**를 클릭합니다.

**Recent commits in Gitea**에 프로젝트로 들어올 내용이 나열됩니다.

![새 커밋 하나가 나열된 Sync with Gitea 대화 상자](https://mintcdn.com/ayakaleaf-pro/IsGnx0wnzqtV4hI8/images/on-premises/gitea-sync-new-commits.png?fit=max\&auto=format\&n=IsGnx0wnzqtV4hI8\&q=85\&s=0403560179cb63a6b5d3853f4590e6a5)

Gitea에서 대기 중인 새 커밋

**2. 변경 사항 설명**

프로젝트에서 무언가를 변경했다면 커밋 메시지 입력란이 나타납니다. 입력은 선택 사항이며, 비워 두면 커밋 이름은 `Updates from Overleaf`가 됩니다.

![커밋 메시지가 입력된 Sync with Gitea 대화 상자](https://mintcdn.com/ayakaleaf-pro/IsGnx0wnzqtV4hI8/images/on-premises/gitea-sync-commit-message.png?fit=max\&auto=format\&n=IsGnx0wnzqtV4hI8\&q=85\&s=014cd300d4deff341310920221c63a30)

변경 사항의 커밋 메시지

**3. Sync 클릭**

**Sync**를 클릭합니다. Gitea의 새 커밋이 프로젝트로 들어오고, 내 변경 사항은 저장소의 기본 브랜치로 갑니다. 양쪽에서 서로 다른 부분을 변경했다면 풀 리퀘스트를 통해 자동으로 병합되며, 이 풀 리퀘스트는 기록으로 Gitea에 남습니다.

**4. 결과 확인**

대화 상자에 \*\*No new commits in Gitea since last merge.\*\*가 표시되고 커밋 메시지 입력란이 사라집니다. 편집기의 파일과 Gitea의 커밋이 최신 상태입니다.

![동기화 후 새 커밋이 없는 Sync with Gitea 대화 상자](https://mintcdn.com/ayakaleaf-pro/IsGnx0wnzqtV4hI8/images/on-premises/gitea-sync-done.png?fit=max\&auto=format\&n=IsGnx0wnzqtV4hI8\&q=85\&s=7a53483772e17e5ad75d5ceb7f44e34e)

모두 동기화됨

### 양쪽에서 같은 줄이 변경된 경우

대화 상자에 변경 사항을 병합할 수 없다는 메시지와 함께, 내 변경 사항을 담은 새 브랜치 `overleaf-YYYY-MM-DD-HHMMSS`의 이름이 표시됩니다. Overleaf는 해당 브랜치로 Gitea에 풀 리퀘스트도 엽니다.

![병합 충돌 경고가 있는 Sync with Gitea 대화 상자](https://mintcdn.com/ayakaleaf-pro/IsGnx0wnzqtV4hI8/images/on-premises/gitea-sync-conflict.png?fit=max\&auto=format\&n=IsGnx0wnzqtV4hI8\&q=85\&s=9acaf32d0930decd2cfce516037a37b1)

충돌

1. Git으로 해당 브랜치를 기본 브랜치에 병합하고 충돌을 해결합니다. 그동안 대화 상자를 닫아도 됩니다. 다시 열면 같은 메시지가 표시됩니다.

   ```bash theme={null}
   git clone <repository-address>
   cd <repository-name>
   git merge origin/overleaf-YYYY-MM-DD-HHMMSS
   # fix the conflict in the file Git names
   git add <file>
   git commit
   git push
   ```
2. **I have manually merged. Continue**를 클릭합니다. 병합된 결과가 프로젝트로 들어옵니다. 브랜치를 병합하기 전에 클릭하면 대화 상자는 그대로 유지됩니다.
3. 브랜치는 Gitea에 남고, 해당 풀 리퀘스트도 열린 상태로 유지됩니다. 더 이상 필요하지 않으면 풀 리퀘스트를 닫고 브랜치를 삭제하세요.

충돌하는 줄이 없더라도 브랜치 보호 규칙이 풀 리퀘스트를 보류하면(예: 승인이 필요한 경우) 같은 대화 상자가 나타납니다. 규칙이 허용하면 Gitea에서 풀 리퀘스트를 병합하고 **I have manually merged. Continue**를 클릭하세요. [Gitea와 동기화가 작동하는 방식](https://ayakaleaf-pro.mintlify.site/ko/on-premises/configuration/overleaf-toolkit/integrations/gitea-synchronisation.md#how-syncing-works-with-gitea)을 참조하세요.

## 프로젝트 연결 해제하기

프로젝트를 더 이상 동기화하지 않으려면 이 작업을 합니다.

**1. Unlink 클릭**

동기화 대화 상자에서 **Unlink**를 클릭합니다.

**2. 확인**

**Confirm**을 클릭합니다. 이 작업은 연결만 제거합니다. 경고에 언급된, 내가 소유한 저장소로의 연결은 이후에 선택할 수 있는 옵션이며 지금 일어나는 일이 아닙니다.

![연결 해제 확인을 요청하는 Sync with Gitea 대화 상자](https://mintcdn.com/ayakaleaf-pro/IsGnx0wnzqtV4hI8/images/on-premises/gitea-sync-unlink-project.png?fit=max\&auto=format\&n=IsGnx0wnzqtV4hI8\&q=85\&s=796d5581463a481fed1772d6695430d1)

연결 해제 확인

**3. 결과 확인**

이제 대화 상자에 **Export Project to Gitea**가 표시됩니다. 프로젝트와 저장소는 모두 내용을 유지합니다. 다시 동기화하려면 프로젝트를 새 저장소로 내보내거나, 저장소를 새 프로젝트로 가져오세요.

## Gitea 계정 연결 해제하기

**Account settings**의 **Gitea**에서 **Unlink**를 클릭한 다음, 대화 상자에서 다시 **Unlink**를 클릭합니다.

![Unlink Gitea Account 대화 상자](https://mintcdn.com/ayakaleaf-pro/IsGnx0wnzqtV4hI8/images/on-premises/gitea-sync-unlink-account.png?fit=max\&auto=format\&n=IsGnx0wnzqtV4hI8\&q=85\&s=b3995614c688a587c031de666d71ce64)

계정 연결 해제

프로젝트는 각자의 저장소에 연결된 상태로 남습니다. 계정을 다시 연결할 때까지 동기화할 수 없습니다.

> [!NOTE]
>
> 공유 프로젝트에서 누가 무엇을 할 수 있는지는 [연결 및 동기화할 수 있는 사람](https://ayakaleaf-pro.mintlify.site/ko/on-premises/configuration/overleaf-toolkit/integrations/gitea-synchronisation.md#who-can-link-and-sync)을 참조하세요.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.