Message “Support for password authentication was removed.”

From 2021-08-13, GitHub is no longer accepting account passwords when authenticating Git operations. You need to add a PAT (Personal Access Token) instead, and you can follow the below method to add a PAT on your system. Create Personal Access Token on GitHub From your GitHub account, go to Settings → Developer Settings → Personal … Read more

Github push event signature don’t match

The default encoding of Crypto hash.update() is binary as detailed in the answer to Node JS crypto, cannot create hmac on chars with accents. This causes a problem in your push-event payload, which contains the character U+00E1 LATIN SMALL LETTER A WITH ACUTE in Hernández four times, and GitHub services is hashing the payload as … Read more

How to get all of a user’s public github commits

https://connectionrequired.com/gitspective is your friend. 🙂 Filter out all but “Push”, and you have your view, albeit without the coding work to implement it yourself first. Inspecting what goes on with the Chrome DevTools “Network” tab might help you mimic the API queries, if you want to redo the work yourself.

GitHub Search API only return 30 results

You need to use page parameter, e.g. for next 30 page = 2 https://api.github.com/search/issues?q=stress+test+label:bug+language:python+state:closed&page=2 You can also use per_page parameter to change the default size of 30. It supports max size of 100. Like this: https://api.github.com/search/issues?q=stress+test+label:bug+language:python+state:closed&per_page=100 More detail can be found here

Is there a way to get the latest tag of a given repo using github API v3

GitHub doesn’t have an API to retrieve the latest tag, as it has for retrieving the latest release. That might be because tags could be arbitrary strings, not necessarily semvers, but it’s not really an excuse, since tags have timestamps, and GitHub does sort tags lexicographically when returning them via its Tags API. Anyway, to … Read more

Embed Github contributions graph in website

I wrote a JavaScript library to do that: github-calendar. Here is an example how to use it: <!– Prepare a container for your calendar. –> <script src=”https://cdn.rawgit.com/IonicaBizau/github-calendar/gh-pages/dist/github-calendar.min.js” > </script> <!– Optionally, include the theme (if you don’t want to struggle to write the CSS) –> <link rel=”stylesheet” href=”https://cdn.rawgit.com/IonicaBizau/github-calendar/gh-pages/dist/github-calendar.css” /> <!– Prepare a container for your … Read more

How to find a Github file ‘s SHA blob

The docs for updating a file specify that you will need to provide the SHA for the file you will be replacing. The easiest way would be to query github for that, too. For example: > curl https://api.github.com/repos/testacc01/testrepo01/contents/test.txt { “name”: “test.txt”, “path”: “test.txt”, “sha”: “4f8a0fd8ab3537b85a64dcffa1487f4196164d78”, “size”: 13, … So, you can see what the SHA … Read more

how to use github api token in python for requesting

Here’s some code that might help you out. Examples: Example 1 (auth): username=”user” token = ‘token’ login = requests.get(‘https://api.github.com/search/repositories?q=github+api’, auth=(username,token)) Example 2 (headers): headers = {‘Authorization’: ‘token ‘ + token} login = requests.get(‘https://api.github.com/user’, headers=headers) print(login.json()) Example 3 (delete repo): user=”username” repo = ‘some_repo’ # Delete this repo headers = {‘Authorization’: ‘token ‘ + token} login … Read more