Accept Github Personal Access tokens as authorization
Currently the only way to authenticate against github in this resource is with a user's private key. I would like to be able to authenticate with a Personal Access Token as well.
The github release resource already accepts an OAuth access token (as the parameter access_token), which can be used to pull and push to private repos. I would like to have that same field on my git-resources so that I can use the same token for authenticating with both resource types.
It is already supported, the trick to set it as the 'password' parameter of the git-resource.
Can we get that added to the readme?
It is already supported, the trick to set it as the 'password' parameter of the git-resource.
this doesn't work in 5.8.0, the configure_credentials function in common.sh expects both username and password to be non-empty to create the .netrc file.
sigh, this works:
username: ((github_apptoken))
password: x-oauth-basic
sigh, this works:
username: ((github_apptoken)) password: x-oauth-basic
An update for anyone trying to use this today: The token is now expected to be in the password field, and the username field is ignored. (Above observed with github's new/experimental FGPATs, not the traditional course-grained access tokens; not sure whether it's true beyond them).