Github Api list commit status when repository is under organisation

橙三吉。 提交于 2019-12-06 07:15:14
VonC

All I can see is:

  • in your curl, you mention :owner:repos instead of :owner/:repos (maybe a typo in your question, or you forgot a '/')
  • GET /repos/:owner/:repo/commits/:ref/statuses means the "List Statuses for a specific Ref" API should be

    https://api.github.com/ + /repos/:owner/:repo/commits/:ref/statuses
    

(not orgs/mydummyorg/ in front of /repos/:owner/:repo/commits/:ref/statuses)

Finally, you need to be registered as the owner or collaborator on that private repo, or even if you do pass your complete credentials (username + password), the answer will always be 404.
Make sure you didn't activate 2FA, or your username+password wouldn't work (you would need to use a PAT -- Personal Access Token -- instead)

The OP Bhavik Shah details in the comments:

I was able to resolve the issue.
The owner detail that I was passing was wrong. It should be organisation name under which the repository is present.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!