Skip to main content
설명서에 자주 업데이트를 게시하며 이 페이지의 번역이 계속 진행 중일 수 있습니다. 최신 정보는 영어 설명서를 참조하세요.
사이트 관리자가 엔터프라이즈 서버 instance Enterprise Server 3.9 이상으로 업그레이드하면 REST API의 버전이 지정됩니다. instance 버전을 찾는 방법을 알아보려면 "GitHub Docs 버전 정보"를 참조하세요. 자세한 내용은 "API 버전 관리 정보"를 참조하세요.

Git LFS

REST API를 사용하여 리포지토리에 대해 Git 대용량 파일 스토리지(LFS)을 사용하거나 사용하지 않도록 설정합니다.

Git LFS 정보

Git LFS를 사용하여 Git 리포지토리에 큰 파일을 저장할 수 있습니다. REST API를 사용하면 개별 리포지토리에 대한 기능을 사용하거나 사용하지 않도록 설정할 수 있습니다. Git LFS에 대한 자세한 내용은 "Git Large File Storage 정보"을 참조하세요.

리포지토리에 대한 관리자 액세스 권한이 있는 사람 이러한 엔드포인트를 사용할 수 있습니다.

Enable Git LFS for a repository

Enables Git LFS for a repository. Access tokens must have the admin:enterprise scope.

"Enable Git LFS for a repository"에 대한 매개 변수

헤더
속성, 형식, Description
accept string

Setting to application/vnd.github+json is recommended.

경로 매개 변수
속성, 형식, Description
owner string 필수

The account owner of the repository. The name is not case sensitive.

repo string 필수

The name of the repository. The name is not case sensitive.

"Enable Git LFS for a repository"에 대한 HTTP 응답 상태 코드

상태 코드Description
202

Accepted

403

We will return a 403 with one of the following messages:

  • Git LFS support not enabled because Git LFS is globally disabled.
  • Git LFS support not enabled because Git LFS is disabled for the root repository in the network.
  • Git LFS support not enabled because Git LFS is disabled for .

"Enable Git LFS for a repository"에 대한 코드 샘플

put/repos/{owner}/{repo}/lfs
curl -L \ -X PUT \ -H "Accept: application/vnd.github+json" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ http(s)://HOSTNAME/api/v3/repos/OWNER/REPO/lfs

Accepted

Disable Git LFS for a repository

Disables Git LFS for a repository. Access tokens must have the admin:enterprise scope.

"Disable Git LFS for a repository"에 대한 매개 변수

헤더
속성, 형식, Description
accept string

Setting to application/vnd.github+json is recommended.

경로 매개 변수
속성, 형식, Description
owner string 필수

The account owner of the repository. The name is not case sensitive.

repo string 필수

The name of the repository. The name is not case sensitive.

"Disable Git LFS for a repository"에 대한 HTTP 응답 상태 코드

상태 코드Description
204

No Content

"Disable Git LFS for a repository"에 대한 코드 샘플

delete/repos/{owner}/{repo}/lfs
curl -L \ -X DELETE \ -H "Accept: application/vnd.github+json" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ http(s)://HOSTNAME/api/v3/repos/OWNER/REPO/lfs

Response

Status: 204