We got a necessity to fetch a zipball of a private repo. For public ones it\'s pretty easy either through GitHub API or manually (https://github.com/user/repo/zipball/ma
I don't seem to have a problem getting a zipball from the private repos for download. I use the same format you have specified and it works perfectly.
I use OAuth2 to get the repositories but I build the link for the zip ball using the format you have given. Here is the application I do this in.
If you are looking to get an OAuth2 token, just use the GitHubt API v3 format, it is pretty simple. Although this doesn't fit your problem exactly :
This is how I get an OAuth2 token from GitHub for this chrome extension
UPDATE
@jayarjo I build the URL here on line 202. I just build the URL like the one you specified, the OAuth2 token isn't even used for it. All my token allows me to do is fetch all the users private data before I create the markup. But it works with no problem...
I think the reason I am actually able to download the zipball is because the URL is actually to https://github.com/* and because I am currently signed in because of the OAuth2 I have permission to get to that URL - where as it sounds like you don't so you get a 404 error.
You may try sending a request to the page and if you get an error response prompt the user to login first, then when you request the zipball you should get it no problem.