Retrieve private repository commits from github

自古美人都是妖i 提交于 2019-12-06 04:00:37

问题


I need to retrieve all commits from Private repositories on github.

I already tried with with github API documentation. It provides the API for retrieving the public repository commits. https://api.github.com/repos/:owner/:repo/commits

Anybody can help me for taking all commits from private repositories?


回答1:


A private repository means you need to authenticate in order to execute your query (here getting the commits).
This should work, if you own the private repo:

curl -u 'username:password' https://api.github.com/repos/:owner/:repo/commits



回答2:


You can also create Personal access tokens for specific use... here.

using postman:

https://api.github.com/repos/:owner/:repo/commits



来源:https://stackoverflow.com/questions/13277286/retrieve-private-repository-commits-from-github

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