Created
May 23, 2024 23:03
-
-
Save camertron/a4850250836876356f8d86579077a5e1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const fs = require('fs') | |
const { createAppAuth } = require('@octokit/auth-app') | |
async function main() { | |
const auth = createAppAuth({ | |
appId: 905201, | |
privateKey: fs.readFileSync('/path/to/private-key.pem', 'utf8') | |
}); | |
const appAuth = await auth({ | |
type: 'app', | |
}); | |
console.log(appAuth.token) | |
} | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment