I am part of an organisation on github with private repositories. I am trying to integrate with one of the cloud services api where in one of the API I need to provide the URL of source-code (tar.gz) of one of those private repositories. This works properly in case of public repositories but I want to get this working for private repos as well.
I am aware that issue is because of the authentication. Is there any way of sending the authentication information in the HTTPS url itself?
Something like
https://username:[email protected]/Organisation/RepoName/archive/master.tar.gz
I have seen many SO questions that describe how this can be achieved through CURL requests, CURL is not the option in my case. I want to be able to send the URL as a string to the API so that the service can download using the URL
EDIT Additional information:
The external could service that I talked about in the question is heroku. Im creating an app from heroku from one of my scripts using heroku api As mentioned in the link I need to send an HTTPS url in the source_blob field. This is were I am trying to send an url to tarball of the private Repo that I am part of
If you need a "simple" URL to craw without it to authenticate, you can just create a proxy, in any language you want, that will authenticate yourself on GitHub (using CURL, for instance), and forward the downloaded file to the client.
To answer
I am aware that issue is because of the authentication. Is there any way of sending the authentication information in the HTTPS url itself?
No, that's not something that HTTP(s) URLs were ever designed to do.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With