> For the complete documentation index, see [llms.txt](https://genos-docs.gitbook.io/default/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://genos-docs.gitbook.io/default/v1.9.5/basic-tutorials/guides/llm/code-serving.md).

# 코드 서빙

## 코드 서빙 목록

<figure><img src="https://1442180325-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FVa1tsb4kzRuGbCJsMdPX%2Fuploads%2Fgit-blob-864b7b86716e97a3494c8cc8434cfac9373812db%2Fcode_serving_list.png?alt=media" alt="코드 서빙 목록"><figcaption><p>코드 서빙 목록 화면</p></figcaption></figure>

* 목록에서 각 코드 서빙의 즐겨찾기, ID, 제목, 상세 설명, 저장소, 제작자, 관리 그룹, 등록일시 정보를 확인할 수 있습니다.
* 제목 등으로 검색하거나 **즐겨찾기만 보기**를 켜서 즐겨찾기한 코드 서빙만 볼 수 있습니다.
* 우측 상단의 **카탈로그 보기**로 다른 사용자가 게시한 코드 서빙을 찾아볼 수 있습니다.
* 우측 상단의 **코드 서빙 생성** 버튼을 클릭하여 새로운 코드 서빙을 생성할 수 있습니다.

## 코드 서빙 생성하기

<figure><img src="https://1442180325-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FVa1tsb4kzRuGbCJsMdPX%2Fuploads%2Fgit-blob-54f0313eb9d28bc76858463d0049a20c1d943644%2Fcode_serving_create.png?alt=media" alt="코드 서빙 생성"><figcaption><p>코드 서빙 생성 화면</p></figcaption></figure>

* **코드 서빙 생성** 버튼을 클릭합니다.
* 코드 서빙 생성을 위한 정보를 입력합니다.
  * **제목** (필수): 코드 서빙의 이름을 입력합니다.
  * **상세 설명** (선택): 코드 서빙의 목적이나 특징을 설명합니다.
  * **관리 그룹** (필수): 코드 서빙을 관리할 그룹을 선택합니다.
  * **저장소 유형** (필수): 내부 Gitea(기본) 또는 외부 Git을 선택합니다. 외부 Git은 Git 호스트 · URL · ID · PAT을 입력하고 검증해야 합니다.
* **생성** 버튼을 클릭하여 코드 서빙을 생성합니다.

자세한 생성 절차는 [코드 서빙 생성](/default/v1.9.5/basic-tutorials/guides/development/code_serving/create_code_serving.md)을 참고하세요.

## 코드 서빙 상세

<figure><img src="https://1442180325-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FVa1tsb4kzRuGbCJsMdPX%2Fuploads%2Fgit-blob-95d811fc069d68dca9b82ff86e9696c583b194d1%2Fc30.png?alt=media" alt="코드 서빙 상세"><figcaption><p>코드 서빙 상세 - 기본 정보</p></figcaption></figure>

* 코드 서빙 목록에서 항목을 더블 클릭하여 상세 페이지로 이동합니다.
* 상세 페이지는 **기본 정보 · 연결 관계 · 리비전 목록 · 커밋 목록 · 인증 키 · 이용 로그 · 데이터 소스** 탭으로 구성됩니다.
* **기본 정보** 탭에서 제작자, 관리 그룹, 등록일시, 저장소, 저장소 URL, 제목, 상세 설명, 트래픽 분배 설정 등을 확인할 수 있습니다.
* 하단의 **수정** 버튼을 클릭하여 제목 · 상세 설명 · 트래픽 분배(외부 Git이면 외부 Git 정보 포함)를 수정할 수 있습니다.
* 배포 단위는 **리비전**입니다. 우측 상단 **리비전 추가**로 커밋을 골라 리비전을 만들고, 리비전 상세에서 배포합니다. 자세한 절차는 [코드 서빙 배포](/default/v1.9.5/basic-tutorials/guides/development/code_serving/deploy_code_serving.md)를 참고하세요.

## 코드 서빙 커밋 목록

<figure><img src="https://1442180325-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FVa1tsb4kzRuGbCJsMdPX%2Fuploads%2Fgit-blob-5a4fd5869057f57f8c194c4661fb5ff2550c12f0%2Fcode_serving_detail_2.png?alt=media" alt="코드 서빙 커밋 목록"><figcaption><p>코드 서빙 상세 - 커밋 목록</p></figcaption></figure>

* **커밋 목록** 탭에서 연결된 저장소의 커밋 히스토리를 확인할 수 있습니다.
* 상단에서 조회할 브랜치를 선택할 수 있습니다.
* 각 커밋의 커밋 해시, 커밋 메시지, 커밋 유저, 등록일시를 확인할 수 있습니다.

## 코드 서빙 인증 키

<figure><img src="https://1442180325-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FVa1tsb4kzRuGbCJsMdPX%2Fuploads%2Fgit-blob-63273afd687d57fe352acb4c7ae107237a66ef9f%2Fcode_serving_detail_3.png?alt=media" alt="코드 서빙 인증 키"><figcaption><p>코드 서빙 상세 - 인증 키</p></figcaption></figure>

* **인증 키** 탭에서 코드 서빙 API 호출 시 사용할 인증 키를 관리할 수 있습니다.
* 등록된 인증 키 목록을 확인할 수 있습니다.

### 인증 키 생성

<figure><img src="https://1442180325-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FVa1tsb4kzRuGbCJsMdPX%2Fuploads%2Fgit-blob-33c1f61a025418b483ba965eba232703f97fec9d%2Fcode_serving_detail_4.png?alt=media" alt="코드 서빙 인증 키 생성"><figcaption><p>코드 서빙 인증 키 생성</p></figcaption></figure>

* **인증 키 생성** 버튼을 클릭하여 새로운 인증 키를 생성할 수 있습니다.
* 생성된 인증 키는 코드 서빙 API 호출 시 인증을 위해 사용됩니다.

## 코드 서빙 로그 확인

<figure><img src="https://1442180325-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FVa1tsb4kzRuGbCJsMdPX%2Fuploads%2Fgit-blob-6f7d3198e48e0dffa4ad457ec480631727088c43%2Fcode_serving_detail_5.png?alt=media" alt="코드 서빙 로그"><figcaption><p>리비전 상세 - 컨테이너 상태</p></figcaption></figure>

* 컨테이너 로그는 **리비전 상세**의 **컨테이너 상태** 탭에서 확인합니다. 코드 서빙 상세 **리비전 목록** 탭에서 리비전 행을 더블클릭하면 리비전 상세로 이동합니다.
* **이벤트 로그**에서는 배포·중지 등 리비전 컨테이너의 주요 이벤트를 확인할 수 있습니다.
* **컨테이너 로그**에서는 실행 중인 컨테이너의 상세 로그를 확인할 수 있습니다.
* 코드 서빙 API 호출 이력은 코드 서빙 상세의 **이용 로그** 탭에서 확인합니다.


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://genos-docs.gitbook.io/default/v1.9.5/basic-tutorials/guides/llm/code-serving.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
