0
votes

I was using Github tags Api for fetching the information about the tags. Git Tags Document.

While doing so I was able to fetch the information of all the tags using https://api.github.com/repos/OWNER/REPO/git/tags , But I want to find the information of a single tag. In the documentation, it was given to use https://api.github.com/repos/OWNER/REPO/git/tags/TAG_SHA for fetching the required tag, but while doing so it show an error as-

{
  "message": "Not Found",
  "documentation_url": "https://docs.github.com/rest/reference/git#get-a-tag"
}

Kindly help me to find the particular tag information.

Is the tag in question a lightweight tag or an annotated tag? - torek
Its an annotated tag. - Akshit
OK, then git rev-parse <tag> will give you its hash ID. Not sure what GitHub API would do that. Presumably once you have the hash ID, you present that hash ID to the GitHub API end-point you mentioned. - torek