GithubHelp home page GithubHelp logo

vaspapadopoulos / github-app-auth Goto Github PK

View Code? Open in Web Editor NEW
7.0 1.0 0.0 9 KB

A simple Python script to authenticate to GitHub as a GitHub App.

License: MIT License

Python 100.00%
github github-app github-rest-api jwt

github-app-auth's Introduction

github-app-auth

Python 3.9

A simple Python script to authenticate to GitHub as a GitHub App.

The script is based on the Ruby script found in Authenticating as a GitHub App . The script requires the GitHub App ID and the path of the PEM-formatted private key and generates the encoded JWT token.

Get JWT for a GitHub App

Required environment variables:

  • GH_APP_ID The GitHub App ID
  • GH_APP_KEY The path for the GitHub App private key PEM file
$ GH_APP_ID=<app_id> GH_APP_KEY=<key> python main.py

Get installation access token for a GitHub App

Required environment variables:

  • GH_APP_ID The GitHub App ID
  • GH_APP_KEY The path for the GitHub App private key PEM file
  • GH_APP_INST_ID The GitHub App installation ID
$ GH_APP_ID=<app_id> GH_APP_KEY=<key> GH_APP_INST_ID=<app_inst_id> python main.py

github-app-auth's People

Contributors

vaspapadopoulos avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.