Skip to main content
이제 REST API의 버전이 지정되었습니다. 자세한 내용은 "API 버전 관리 정보"를 참조하세요.

Git LFS에 대한 REST API 엔드포인트

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

Git LFS 정보

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

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

Git LFS의 사용량이 청구될 수 있습니다. 자세한 내용은 "Git Large File Storage 요금 청구 정보"을(를) 참조하세요.

조직에 속한 리포지토리에 이러한 엔드포인트를 사용하려면 관리자가 리포지토리에 액세스할 수 있어야 하며(조직 소유자 상속될 수 있음), 해당 역할도 조직의 청구에 대한 액세스 권한을 제공해야 합니다.

  • GitHub Team의 조직이 리포지토리를 소유하는 경우 조직 소유자 또는 청구 관리자여자 합니다. 자세한 내용은 “조직의 역할”을 참조하세요.
  • GitHub Team에 있는 조직이 리포지토리를 소유하고 엔터프라이즈 계정이 소유하지 않는 경우 조직 소유자 또는 청구 관리자여자 합니다. 자세한 내용은 "조직의 역할"을(를) 참조하세요.
  • 엔터프라이즈 계정에서 소유한 조직이 리포지토리를 소유한 경우 엔터프라이즈 소유자이거나 청구 관리자여야 합니다. 자세한 정보는 "엔터프라이즈에서의 역할"을(를) 참조하세요.

Enable Git LFS for a repository

Enables Git LFS for a repository.

OAuth app tokens and personal access tokens (classic) need the admin:enterprise scope to use this endpoint.

"Enable Git LFS for a repository"에 대한 세분화된 액세스 토큰

이 엔드포인트는 GitHub 앱 사용자 액세스 토큰, GitHub 앱 설치 액세스 토큰 또는 세분화된 개인용 액세스 토큰에서 작동하지 않습니다.

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

헤더
이름, Type, 설명
accept string

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

경로 매개 변수
이름, Type, 설명
owner string Required

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

repo string Required

The name of the repository without the .git extension. The name is not case sensitive.

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

상태 코드설명
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>" \ -H "X-GitHub-Api-Version: 2022-11-28" \ https://api.github.com/repos/OWNER/REPO/lfs

Accepted

Disable Git LFS for a repository

Disables Git LFS for a repository.

OAuth app tokens and personal access tokens (classic) need the admin:enterprise scope to use this endpoint.

"Disable Git LFS for a repository"에 대한 세분화된 액세스 토큰

이 엔드포인트는 GitHub 앱 사용자 액세스 토큰, GitHub 앱 설치 액세스 토큰 또는 세분화된 개인용 액세스 토큰에서 작동하지 않습니다.

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

헤더
이름, Type, 설명
accept string

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

경로 매개 변수
이름, Type, 설명
owner string Required

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

repo string Required

The name of the repository without the .git extension. The name is not case sensitive.

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

상태 코드설명
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>" \ -H "X-GitHub-Api-Version: 2022-11-28" \ https://api.github.com/repos/OWNER/REPO/lfs

Response

Status: 204