简体   繁体   中英

curl url to get the json file for issues in my repository

I just have started off to use github api to pull issues records from our repository. When I hit,

curl -k -H "Content-Type: application/json" https://2b9e36bvb9e36b82d38b9c0ab2b9e36b82d3:x-oauth-basic@rnd.git.corp/newlands/hello-world/issues

I get the following output.

> <html><body>You are being <a
> href="https://rnd.git.corp/login?return_to=https%3A%2F%2Frnd.git.corp%2Fnewlands%2Fhello-world%2Fissues">redirected</a>.</body></html>

Is there anything wrong with my curl command ? it ideally should print the issue list in my repository as per git api doc. Appreciate any help on this.

如果rnd.git.corp是根据URL来api.github.com ,你也许只是错过/repos ,如https://rnd.git.corp/repos/newlands/hello-world/issues

Thanks @Vampire. I think I got solution. We've got enterprise github install in our Org, whose api access URL is slightly different .

So, for GitHub Enterprise the URL should be something like,

https://rnd.git.corp/api/v3/newlands/hello-world/issues

If someone wants to add more or correct this answer, feel free. Peace!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM