We’ve just added site-wide token based authentication. You can find your API token in your account page, front and center.
Simply pass login
and token
to any URL which requires authentication.
For example:
We’ll be enhancing the API soon, but in the meantime you can use this to more easily build tools and automation around GitHub. Enjoy.
It seems to not work:
eugzol@home-macbook:~$ curl -F ‘repository[name]=API_Hotness’ -F ‘login=defunkt’ -F ‘token=6ef8395fecf207165f1a82178ae1b984’ https://github.com/repositories You are being redirected.
@EugZol that’s my username and token, which I changed – you need to supply it with your own.
Updated the awesome command-line gist I saw which made me ask for this feature. Thanks again for implementing this, I can’t wait to see the API enhancements.
https://gist.github.com/12231
@martinisoft – perhaps move the explicit TOKEN value into ENV[‘GITHUB_TOKEN’]
Is this token something like a password, that in combination with my username allows to make changes under my name? If so, you might want to mention that you need to keep it secret.
@drnic – great suggestion, I want to refactor parts of that script, but I wanted to do a quick edit to support the API key stuff.
One thing I did notice is that the API Token is a one-off thing and can’t be regenerated. Any plans to add in something to regenerate the token in case of security issues?
Please keep your token secret.
Changing your password will change the token.
I’d like to:
curl -F “repository[name]=${PROJECT}” \ -F “login=${LOGIN}” \ -F “token=${TOKEN}” \ -F “repository[description]=” \ -F “repository[homepage]=” \ -F “repository[public]=true” \ -F “commit=Create Repository” \ https://github.com/repositories
but this won’t work over HTTPS, only HTTP
Any plans to add in something to regenerate the token in case of security issues?
Dissertation Writing | Thesis Writing | report writing
Exactly,that in combination with my username allows to make changes under my name? If so, you might want to mention that you need to keep it
Research Paper Writing | Assignment Writing
Thanks for helpful guidelines on Token Authentication.
Essay writing | writing term paper | writing research paper