I was just looking for the same problem and apparently this is not possible. what you requested is called Implicit Submission, and the link you provided for the Github api states that:
Implicit grant type not supported
You can access it using cors or jsonp, which are referred to as methods for using the Github api ( json-p , cors ), but if you are not authenticated, the speed limit is limited to 60 requests per hour <a4>
Edit:
So, I did some reading, if you want to use their api with a web browser script, you can create a Personal access token and define it as no scope . This will only provide access to your publicly available information. Thus, you can use this token without fear of publicly publishing it on a website, and someone is abusing it.
source share