浏览代码

Add API rate limit and two factor authentication doc

Daniel Londero 11 年之前
父节点
当前提交
e776294616
共有 2 个文件被更改,包括 16 次插入0 次删除
  1. 2 0
      doc/04-schema.md
  2. 14 0
      doc/articles/troubleshooting.md

+ 2 - 0
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

+ 14 - 0
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 <oauthtoken>`
+
+Now Composer should install/update without asking for authentication.