简体   繁体   English

卷曲URL以获取我的存储库中存在问题的json文件

[英]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. 我刚刚开始使用github api从我们的存储库中提取问题记录。 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 ? 我的curl命令有什么问题吗? it ideally should print the issue list in my repository as per git api doc. 理想情况下,应该按照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 . 我们在Org中安装了企业github ,其api访问URL略有不同

So, for GitHub Enterprise the URL should be something like, 因此,对于GitHub Enterprise,URL应该是这样的,

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

If someone wants to add more or correct this answer, feel free. 如果有人想添加更多或更正此答案,请放心。 Peace! 和平!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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