I was trying to create a repo in gitHub via cURL. However whenever I am trying to create the repo the it gives me the login URL via a redirect and I'm not able to proceed anywhere from there. Doesn't give me an option to insert my credentials as well. I am using my access token to login. Not sure how do I proceed from here.
So below is the piece of cURL I'm trying:
curl -H "Authorization: token" -k https://enterprise.github.com/orgs/internal/repositories -d '{\"name\": \"testRepo\", \"description\": \"my test repo\", "\private\":\true\}'
And I always get the below response back:
<html><body>You are being <a href="https://enterprise.github.com/login?return_to=https%3A%2F%2Fenterprise.github.com%2Forgs%2Finternal%2Frepositories">redirected</a>.</body></html>
What I'm not able to figure out is how do I login from here and why do I have to do another login when I'm using access token to login? I have also tried using -L in the cURL, but that didn't helped either.