componentjs / component

frontend package manager and build tool for modular web applications
https://github.com/componentjs/guide
MIT License
4.55k stars 305 forks source link

support for github access tokens #547

Closed apla closed 10 years ago

apla commented 10 years ago

when using github remotes, there is a message about requests quota. to avoid this only solution for now is store login and password on disk unencrypted.

please implement access tokens for github.

https://help.github.com/articles/creating-an-access-token-for-command-line-use https://gist.github.com/madrobby/9476733 http://stackoverflow.com/questions/4604663/github-download-single-files

jonathanong commented 10 years ago

it's the same thing. https://developer.github.com/v3/auth/#via-oauth-tokens

ukd1 commented 10 years ago

@jonathanong the docs don't say that, also tokens don't require the username as well. Could you update the docs?

Is it something like:

GITHUB_USERNAME=<token>
GITHUB_PASSWORD=x-oauth-basic
jonathanong commented 10 years ago

yup. i'll add it to the guide.

jonathanong commented 10 years ago

it says you could leave a blank password, but i might have been too strict with that.

timaschew commented 10 years ago

Who says you could leave a blank, github? Why it's too strict?

jonathanong commented 10 years ago

yeah. my checks are too strict because i require you to have a password. but GITHUB_PASSWORD=x-oauth-basic is fine, probably preferable since it's more specific

dominicbarnes commented 10 years ago

Just curious, but I thought the username/password for tokens is the reverse? For example, our netrc files look like:

machine api.github.com
  login x-oauth-token
  password {token}
jonathanong commented 10 years ago

doesn't look like that https://developer.github.com/v3/auth/#via-oauth-tokens

though github probably just made it really flexible because why not

dominicbarnes commented 10 years ago

Haha, yeah that looks to be the case. :P

sachalifs commented 10 years ago
machine api.github.com
    GITHUB_USERNAME=<token>
    GITHUB_PASSWORD=x-oauth-basic

this should totally be on the guide :+1:

chemzqm commented 10 years ago

I've added config github access section to the guide https://github.com/component/guide/blob/master/component/getting-started.md