Solved USE_GITHUB and private repository

Hi,
Is there way to download source code from a private repository on Github? Fetching tarball from github use HTTPS which is not available for private repository (SSH only).
Regards
 
I guess running git-archive(1) yourself should probably work. Something like
git archive -o foo-1.0.tar.gz --remote=ssh://........./repo.git v1.0 (where v1.0 is an example tag name, or just name a branch here...)

edit, wait, why USE_GITHUB? If you intend to use this for a port, this won't work. I mean, fetching anything from a private repo needs authentication. Although you could come up with a custom do-fetch using the git-archive(1) method, you'd have to hardcode the credentials into the port, so this would kind of contradict the whole point of making a repository "private"? :-/
 
If you want to keep development of that code private, you could create a public repository and only merge your release code to that. Then you can use the public repository (with the released code) for distribution.
 
edit, wait, why USE_GITHUB? If you intend to use this for a port, this won't work. I mean, fetching anything from a private repo needs authentication. Although you could come up with a custom do-fetch using the git-archive(1) method, you'd have to hardcode the credentials into the port, so this would kind of contradict the whole point of making a repository "private"? :-/

Yes, redefine do-fetch target is the way to go. Thanks
If you want to keep development of that code private, you could create a public repository and only merge your release code to that. Then you can use the public repository (with the released code) for distribution.

Sadly, nothing must be public. Thanks
 
I have the same problem as oOiOo . I have some private projects hosted on Github that I build using the ports tree and Poudriere. And just like he suggested, I redefined `do-fetch`. But my solution is kind of a hack, because `make fetch` still requires SSH credentials. I think a better solution would involve Github Personal Access Tokens. Ideally, I would create such a token that would allow read-only access, and the Poudriere user would have access to it. But I haven't gotten such a setup working yet.
 
Back
Top