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 |
경로 매개 변수 |
속성, 형식, 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:
|
"Enable Git LFS for a repository"에 대한 코드 샘플
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
Status: 202
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 |
경로 매개 변수 |
속성, 형식, 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"에 대한 코드 샘플
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