From e776294616a2678cb2f7d2cdfdbb91590e0ec9f4 Mon Sep 17 00:00:00 2001 From: Daniel Londero Date: Wed, 15 Jan 2014 18:17:31 +0100 Subject: [PATCH] Add API rate limit and two factor authentication doc --- doc/04-schema.md | 2 ++ doc/articles/troubleshooting.md | 14 ++++++++++++++ 2 files changed, 16 insertions(+) diff --git a/doc/04-schema.md b/doc/04-schema.md index f0852668d..6ff3baccb 100644 --- a/doc/04-schema.md +++ b/doc/04-schema.md @@ -684,6 +684,8 @@ The following options are supported: `{"github.com": "oauthtoken"}` as the value of this option will use `oauthtoken` to access private repositories on github and to circumvent the low IP-based rate limiting of their API. + [Read more](articles/troubleshooting.md#api-rate-limit-and-two-factor-authentication) + on how to get an oauth token for GitHub. * **vendor-dir:** Defaults to `vendor`. You can install dependencies into a different directory if you want to. * **bin-dir:** Defaults to `vendor/bin`. If a project includes binaries, they diff --git a/doc/articles/troubleshooting.md b/doc/articles/troubleshooting.md index 3483b1caf..e30b08cf8 100644 --- a/doc/articles/troubleshooting.md +++ b/doc/articles/troubleshooting.md @@ -104,3 +104,17 @@ Or, you can increase the limit with a command-line argument: 2. Search for an ```AutoRun``` key inside ```HKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor``` or ```HKEY_CURRENT_USER\Software\Microsoft\Command Processor```. 3. Check if it contains any path to non-existent file, if it's the case, just remove them. + +## API rate limit and two factor authentication + +Because of GitHub's rate limits on their API it can happen that Composer prompts +for authentication asking your username and password so it can go ahead with its work. +Unfortunately this will not work if you enabled two factor authentication on +your GitHub account and to solve this issue you need to: + +1. [Create](https://github.com/settings/applications) an oauthtoken on GitHub. +[Read more](https://github.com/blog/1509-personal-api-tokens) on this. + +2. Add it to the configuration running `composer config -g github-oauth.github.com ` + +Now Composer should install/update without asking for authentication.