We can use github’s personal access tokens in order to programmatically authenticate and gain access to our github account without having to log in. This is especially useful when building a CI/CD pipeline and wanting to download the code directly from a private repository.
You can generate a token by going to github developer settings and selecting personal access token in the left sidebar.
After selecting the validity period and permissions, you should receive a hash. Copy it now as you won’t be able to view it again after leaving this page.
Go to AWS Secrets Manager console and create a new plain text secret
Name the token and add a description so you know what it’s for
Get the token id and arn