所以我試圖從一個虛擬組織中刪除一堆回購(我是貢獻者),我是所有者。我正在關注GitHub文檔 - https://developer.github.com/v3/repos/#delete-a-repository如何使用GitHub API刪除存儲庫?
由於它是GitHub Enterprise帳戶,因此URL端點略有不同。
這裏是我的捲曲命令,它拋出的錯誤對我來說:
curl -i -H 'Authorization: token {token}' DELETE 'https://{hostname}/api/v3/repos/{myUsername}/{reponame}'
有什麼非常錯誤的我在幹什麼?我在這裏查找類似的問題後嘗試了不同的組合,但似乎沒有任何工作。
這裏的捲曲輸出:
curl: (6) Could not resolve host: DELETE
HTTP/1.1 404 Not Found
Server: GitHub.com
Date: Thu, 14 Sep 2017 16:45:20 GMT
Content-Type: application/json; charset=utf-8
Content-Length: 102
Status: 404 Not Found
X-OAuth-Scopes: repo, user
X-Accepted-OAuth-Scopes: repo
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: *
X-GitHub-Request-Id: ce484b8e-e6fb-41b3-aaca-65b047be1e3f
Content-Security-Policy: default-src 'none'
Strict-Transport-Security: max-age=31536000; includeSubdomains
X-Content-Type-Options: nosniff
X-Frame-Options: deny
X-XSS-Protection: 1; mode=block
{
"message": "Not Found",
"documentation_url": "https://developer.github.com/enterprise/2.9/v3"
}
它沒有:(我仍然得到404!可能是什麼問題?它不能是認證/授權,對嗎? – Saturnian