3 ms·
If you do that with curl it will redirect to the login page. Github obviously wants me to use their API. I assume this wasn't always the case as the use case I
by jancsika 7y ago
If you do that with curl it will redirect to the login page. Github obviously wants me to use their API.
I assume this wasn't always the case as the use case I'm referencing is a build script I'm debugging.
- detaro 7y agoThe example link above works for me, interestingly enough.
- james_s_tayler 7y agoI just tried running curl on it now and it came back fine without redirecting me. For a private repo you just need to set the correct options to curl. curl -Lk --cookie "user_session=your_session_cookie_here" https://github.com/your_org/your_project/pull/123.patch https://github.com/your_org/your_project/pull/123.patch
- jancsika 7y agoAnd what is the unix tool I use to automatically retrieve the session cookie and paste it there?
- james_s_tayler 7y agoNaturally, you use curl. You just instruct curl to save the cookies that the login process sends back to you. Then you reuse those cookies on the subsequent request. Found an example here. https://gist.github.com/d48/3501047 https://gist.github.com/d48/3501047