Any easy ways of getting the x-access-token for repos?

Hi,

Since Personal Access Token (PAT) can’t be limited to a specific repo, I’m attempting the Github App route.

Installations with permissions on contents of a repository, can use their installation access tokens to authenticate for Git access. Use the installation access token as the HTTP password:

git clone https://x-access-token:<token>@github.com/owner/repo.git

Source

I’m trying to get a token with long-life (not just 8hrs).

There are quite a few steps to get this token, is there an easier way? or even a direct step-by-step guide/script on doing this easily?

Thanks,