'Unable to access private repositoryusing github API

I'm unable to pull issues of private repository under my account.

I've created personal access token with repo permissions.

Using this command to fetch issues :

curl -i https://api.github.com/repos/{owner}/{repo}/issues -H "Authorization: token {personal-access-token}" But getting error :

{ "message": "Not Found", "documentation_url": "https://docs.github.com/rest/reference/issues#list-repository-issues" }



Solution 1:[1]

Maybe check for the repository under the organization account; then you must use:

https://api.github.com/repos/{organization}/{repo}/issues

The full command:

curl -H "Authorization: token {personal-access-token}" -H "Accept: application/vnd.github.v3+json" https://api.github.com/repos/{organization}/{repo}/issues

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Jeremy Caney