【发布时间】:2017-11-11 16:48:55
【问题描述】:
我们正在将我们的 Github 存储库移动到带有 GitLab-Server 的本地服务器。我们将使用 Jenkins-Server 进行构建。
在此之前,我们想知道两台机器上的硬盘驱动器必须有多大。
-> GitServer 将需要用于存储库的磁盘空间
-> Jenkins-Server 将需要用于存储库的磁盘空间 + 用于构建的空间
为此:有没有办法找出我们所有存储库共有多少磁盘空间——不仅是实际文件大小,而且是整个 git 存储库的大小?
我阅读了有关 API 的信息。 但是做
curl -i -u <myUserName> https://api.github.com/orgs/<organisationName>
我实际上可以接收元数据,但它似乎没有提供有关实际使用的磁盘空间的任何信息:
HTTP/1.1 200 OK
Server: GitHub.com
Date: Fri, 09 Jun 2017 15:09:07 GMT
Content-Type: application/json; charset=utf-8
Content-Length: 1463
Status: 200 OK
X-RateLimit-Limit: 5000
X-RateLimit-Remaining: 4980
X-RateLimit-Reset: 1497022865
Cache-Control: private, max-age=60, s-maxage=60
Vary: Accept, Authorization, Cookie, X-GitHub-OTP
ETag: "62fadd06b840f42f8bf9cb69450b9d1b"
Last-Modified: Tue, 30 May 2017 12:33:36 GMT
X-GitHub-Media-Type: github.v3; format=json
Access-Control-Expose-Headers: ETag, Link, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval
Access-Control-Allow-Origin: *
Content-Security-Policy: default-src 'none'
Strict-Transport-Security: max-age=31536000; includeSubdomains; preload
X-Content-Type-Options: nosniff
X-Frame-Options: deny
X-XSS-Protection: 1; mode=block
X-Runtime-rack: 0.068430
X-GitHub-Request-Id: XXXX:XXXX:XXXXXXX:XXXXXXX:XXXXXXX
{
"login": "XXXXXXXX",
"id": XXXXXXXXX,
"url": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
"repos_url": "https://api.github.com/orgs/XXXXXXX/repos",
"events_url": "https://api.github.com/orgs/XXXXXX/events",
"hooks_url": "https://api.github.com/orgs/XXXXXX/hooks",
"issues_url": "https://api.github.com/orgs/XXXXXX/issues",
"members_url": "https://api.github.com/orgs/XXXXXX/members{/member}",
"public_members_url": "https://api.github.com/orgs/XXXXXX/public_members{/member}",
"avatar_url": "https://avatars1.githubusercontent.com/XXXXXX",
"description": "XXXXXX",
"name": "XXXXXX",
"company": null,
"blog": "XXXXXX",
"location": "XXXXXX",
"email": "XXXXXXXXXXXXXXXXXXXX",
"has_organization_projects": true,
"has_repository_projects": true,
"public_repos": 0,
"public_gists": 0,
"followers": 0,
"following": 0,
"html_url": "https://github.com/XXXXXXXXXXXXXX",
"created_at": "2016-09-14T11:30:47Z",
"updated_at": "2017-05-30T12:33:36Z",
"type": "Organization",
"total_private_repos": 62,
"owned_private_repos": 62,
"private_gists": null,
"disk_usage": null,
"collaborators": null,
"billing_email": null,
"plan": {
"name": "team",
"space": 976562499,
"private_repos": 99999,
"filled_seats": 15,
"seats": 15
},
"default_repository_permission": null,
"members_can_create_repositories": true
}
有一个标签space,但它似乎只是可用的最大空间而不是使用的。还有另一个标签disk_usage,但它是null。
【问题讨论】:
标签: git github repository github-api