Accessing commit history from github via terminal?
Need quick help. Novice terminal user here. Trying these instructions: https://developer.github.com/v3/repos/statistics/#commit-activity to get the commit history for a specific user.
However, I don't know what to do about it:
GET /repos/:owner/:repo/stats/contributors
When I replace the owner and repo with the specific names I am using, nothing happens because I get this error in my terminal:
-bash: GET: command not found
This is a very sensitive issue, please help! Thank!
source to share
You can follow this tutorial twisting using the GitHub API to see how you will translate
GET /repos/:owner/:repo/stats/contributors
As you notice in the comments , don't include the ":".
curl --include https://api.github.com/users/caspyin
Pass user credentials for basic auth to access protected resources, such as select gists users, or personal information associated with their profile
curl --user "caspyin:PASSWD" https://api.github.com/gists/starred
curl --user "caspyin:PASSWD" https://api.github.com/users/caspyin
Passing only the username without the colon (
:
) will result in you being prompted for the account password.
This avoids entering your password in the command line history
curl --user "caspyin" https://api.github.com/users/caspyin
In your case, replacing <owner>
both <reponame>
with the correct owner and repo names:
curl https://api.github.com/repos/<owner>/<reponame>/stats/contributors
source to share