Github clone with oauth access token
Just use the HTTPS address to clone with the key as the user, so:
git clone https://[email protected]/username/repo.git
I turned out to be a scope issue. I of course needed full repo
scope since I was trying to clone a private
repository.
It's a shame Github does not have some clearer error messages for these kind of things, but security wise I understand why.
For anyone trying to figure out what is wrong when trying out something like this, I would suggest to create a personal access token with full access to everything:
settings > developer settings > personal access tokens > generate new token
This way you can easily test if it is a scope issue by comparing your token with a personal access token that has access rights for everything.
Thanks for anyone who still took the time to read this.