0.0
The project is in a healthy, maintained state
Authenticate to the GitHub API using a GitHub App
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Development

~> 3.12
~> 3.18

Runtime

~> 1.0
~> 2.6
~> 2.8
~> 3.0
 Project Readme

GitHub CI Tools

Authenticating to the GitHub API using a GitHub App is slightly more complicated than using a PAT but it is a more secure method.

In order to make this easier in ruby application this gem includes executables that can generate an authentication token or dispatch a GitHub event.

Usage

You must configure your GitHub App following the instructions here.

You should ensure that the following ENV variables are set:

  • CLIENT_ID
  • GITHUB_INSTALLATION_ID
  • GITHUB_PRIVATE_KEY_B64 - the base 64 encoded private key.

Generating a token

ruby -Ilib ./bin/generate_token

One way to encode your private key on a mac

Set the private key to an ENV variable:

$ export MY_KEY="----BEGIN RSA..."

$ export ENCODED_KEY=(echo $MY_KEY | base64)