1

I have a repo with source code / releases for a mac app and a server that regulates version updates.

I have one repo for the app and another for the update server I'm using squirrel.

My plan was to have the releases out of the repos. I think that that's a best practice.

I just tried to download the release which is in a private repo with this link

https://<TOKEN>:x-oauth-basic@github.com/user/repo/releases/download/v0.0.1/app-v0.0.1.zip

and it didn't work, it would be nice if it did =)

Thoughts? Is there any other way to do this? Should I just have the release in the server repo?

ThomasReggi
  • 55,053
  • 85
  • 237
  • 424
  • have you found any workaround for this question? – Tomasz Kowalczyk Feb 06 '15 at 07:54
  • I've included the releases in the repo for the update server. It's really bad practice. Unfortunately github doesn't allow any way to download a release from a private repo with the API. – ThomasReggi Feb 09 '15 at 02:04
  • 1
    Maybe there is somekind of uservoice for GH so we could suggest them something like that ;) – Tomasz Kowalczyk Feb 09 '15 at 07:37
  • 2
    this post here states github's response on the matter http://stackoverflow.com/a/20515932/340688 – ThomasReggi Feb 09 '15 at 19:15
  • I believe the SO post with GH's response, has techniques for downloading the releases, you just have to put/craft it together yourself, not a prebuilt solution to copy & paste to use. – David Sep 22 '15 at 19:24
  • But, here is a sample solution that's available, you just need to adapt it to your needs: http://brantiffy.axisj.com/archives/215, https://github.com/brant-hwang/get-git-private-repo-latest-release-zip – David Sep 22 '15 at 19:25

1 Answers1

0

One Solution:

http://github.com/brant-hwang/get-git-private-repo-latest-release-zip

ID={YOUR_GITHUB_ID}
PW={YOUR_GITHUB_PASSWORD}
OWNER={OWNER}
REPO={REPOSITORY}

curl -u $ID:$PW https://api.github.com/repos/$OWNER/$REPO/releases/latest > latest.json
TAG_NAME=`cat latest.json | jq '.tag_name' |  tr -d '"'`
URL="https://github.com/$OWNER/$REPO/archive/$TAG_NAME.zip"
curl -O -J -L -u $ID:$PW $URL

Outlined here in Korean :(

ThomasReggi
  • 55,053
  • 85
  • 237
  • 424