Hello I am trying to list all releases from a private repo, and I just keep seeing 404 errors.
This has two releases:
According to this documentation:
It says I need to use the following:
However, when I use this syntax:
I get a 404 returned from the API.
HTTP/1.1 404 Not Found Server: GitHub.com Date: Thu, 31 Jan 2019 19:15:48 GMT Content-Type: application/json; charset=utf-8 Content-Length: 87 Status: 404 Not Found
What am I doing wrong? I have tried with the id's instead of names and that didn't work either, I am definitley authing fine as if I remove that then I get a access denied error instead.
Solved! Solved! Go to Solution.
I believe the answer to this may be as easy as removing the trailing slash from the URL you are trying to get. Using the node Repository as an example, I am able to fetch:
But, when I try to fetch
I get a 404.
Let me know if this works!
That's embararsing, I do get results but not what I would expect:
Array ( [url] => https://api.github.com/repos/runtman/testy-mctesttest/releases [content_type] => application/json; charset=utf-8 [http_code] => 200 [header_size] => 1208 [request_size] => 285 [filetime] => -1 [ssl_verify_result] => 0 [redirect_count] => 0 [total_time] => 0.443677 [namelookup_time] => 0.012436 [connect_time] => 0.105148 [pretransfer_time] => 0.312936 [size_upload] => 0 [size_download] => 5 [speed_download] => 11 [speed_upload] => 0 [download_content_length] => 5 [upload_content_length] => -1 [starttransfer_time] => 0.44362 [redirect_time] => 0 [redirect_url] => [primary_ip] => 22.214.171.124 [certinfo] => Array ( ) [primary_port] => 443 [local_ip] => 192.168.1.67 [local_port] => 39770 )
Is this because it's private? I see no download urls etc
HTTP/1.1 200 OK Server: GitHub.com Date: Sat, 02 Feb 2019 23:47:04 GMT Content-Type: application/json; charset=utf-8 Content-Length: 5 Status: 200 OK X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4993 X-RateLimit-Reset: 1549154013 Cache-Control: private, max-age=60, s-maxage=60 Vary: Accept, Authorization, Cookie, X-GitHub-OTP ETag: "847ca9e05b55c0f672831817ef26025b" X-OAuth-Scopes: admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, delete_repo, gist, notifications, repo, user, write:discussion X-Accepted-OAuth-Scopes: repo X-GitHub-Media-Type: github.v3; format=json Access-Control-Expose-Headers: ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type Access-Control-Allow-Origin: * Strict-Transport-Security: max-age=31536000; includeSubdomains; preload X-Frame-Options: deny X-Content-Type-Options: nosniff X-XSS-Protection: 1; mode=block Referrer-Policy: origin-when-cross-origin, strict-origin-when-cross-origin Content-Security-Policy: default-src 'none' X-GitHub-Request-Id: 9F5C:6489:64DEC0:DD811A:5C562BF7 [ ]
So that's dumping info and output of the curl request, I don't see anything useful here