Skip to main content
설명서에 자주 업데이트를 게시하며 이 페이지의 번역이 계속 진행 중일 수 있습니다. 최신 정보는 영어 설명서를 참조하세요.

이 버전의 GitHub Enterprise는 다음 날짜에 중단되었습니다. 2023-03-15. 중요한 보안 문제에 대해서도 패치 릴리스가 이루어지지 않습니다. 성능 향상, 향상된 보안, 새로운 기능을 위해 최신 버전의 GitHub Enterprise로 업그레이드합니다. 업그레이드에 대한 도움말은 GitHub Enterprise 지원에 문의하세요.

최근에 REST API 설명서 중 일부를 이동했습니다. 원하는 항목을 찾을 수 없는 경우 새 Branches, Collaborators, Commits, Deploy Keys, Deployments, GitHub Pages, Releases, Metrics, Webhooks REST 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