When I do
remote = f"https://{username}:{password}@github.com/user/repo"
git.Repo.clone_from(remote, 'repo')
I get to clone the repository with my personal credentials.
But if I try an app credentials
remote = f"https://x-access-token:{token}@github.com/user/repo.git"
git.Repo.clone_from(remote, 'repo')
I get
remote: Invalid username or password. fatal: Authentication failed for 'https://github.com/user/repo'
I have installed the app and added it to the repository integrations. It has content permissions to read and write.
I am using the client secret as the token.