이 버전의 GitHub Enterprise는 다음 날짜에 중단됩니다. 2023-03-15. 중요한 보안 문제에 대해서도 패치 릴리스가 이루어지지 않습니다. 성능 향상, 향상된 보안, 새로운 기능을 위해 최신 버전의 GitHub Enterprise로 업그레이드합니다. 업그레이드에 대한 도움말은 GitHub Enterprise 지원에 문의하세요.
We've recently moved some of the REST API documentation. If you can't find what you're looking for, you might try the new Branches, Collaborators, Commits, Deploy Keys, Deployments, GitHub Pages, Releases, Metrics, Webhooks REST API pages.
Git LFS
REST API를 사용하여 리포지토리에 Git 대용량 파일 스토리지(LFS)을 사용하거나 사용하지 않도록 설정합니다.
Git LFS 정보
Git LFS를 사용하여 Git 리포지토리에 대용량 파일을 저장할 수 있습니다. REST API를 사용하면 개별 리포지토리에 대한 기능을 사용하거나 사용하지 않도록 설정할 수 있습니다. Git LFS에 대한 자세한 내용은 "Git LFS정보"를 참조하세요.
리포지토리에 대한 관리자 액세스 권한이 있는 사람 이러한 엔드포인트를 사용할 수 있습니다.
Enable Git LFS for a repository
Enables Git LFS for a repository. Access tokens must have the admin:enterprise
scope.
매개 변수
헤더 |
---|
이름, Type, 설명 |
accept stringSetting to |
경로 매개 변수 |
이름, Type, 설명 |
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. |
HTTP 응답 상태 코드
상태 코드 | Description |
---|---|
202 | Accepted |
403 | We will return a 403 with one of the following messages:
|
코드 샘플
curl \
-X PUT \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
http(s)://HOSTNAME/api/v3/repos/OWNER/REPO/lfs
Accepted
Status: 202
Disable Git LFS for a repository
Disables Git LFS for a repository. Access tokens must have the admin:enterprise
scope.
매개 변수
헤더 |
---|
이름, Type, 설명 |
accept stringSetting to |
경로 매개 변수 |
이름, Type, 설명 |
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. |
HTTP 응답 상태 코드
상태 코드 | Description |
---|---|
204 | No Content |
코드 샘플
curl \
-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