Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get a GitHub App access token via shell

Given an app id and secret (pem), how can I get an access token for a repo my app is installed at via a shell script?

like image 308
Nabil A. Avatar asked Sep 03 '26 11:09

Nabil A.


1 Answers

This script is what you are looking for. It uses only open-ssl, jq and curl. You can either get a token only for a given repo or all repos the app is installed to.

like image 60
Nabil A. Avatar answered Sep 05 '26 16:09

Nabil A.



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!