githubauthorizationgithub-apideploy-keys

How can I use Deploy key for authentication to use Github API?


I was given with Deploy key of a repository. How can I use Github API to use deploy key for Authorization. Is there any python module to achieve this? Note : I cannot use personal access tokens.


Solution

  • You cannot use a deploy key to access the GitHub API. Deploy keys are SSH keys, and they allow access only over SSH. The GitHub API operates only over HTTPS, and so you'll be unable to authenticate with a deploy key.

    You can either use a personal access token or some other sort of OAuth token to access the GitHub API. GitHub documents various methods of authentication you can use and how they work.