Generally speaking, the installation of composer under Windows is very simple, the following steps can be done! CMD to run the command:
Scenario One: Curl-s Http://getcomposer.org/installer | PHP, if your curl is not available, you can also use the scheme.
Scenario Two: Download software directly to install Https://getcomposer.org/Composer-Setup.exe
Then there is the update problem: Just run the following command under CMD:
PHP Composer.phar self-update
You may then encounter the following issues in the process of updating or executing composer:
1.Could not fetch https://api.github.com/repos/jquery/jquery, enter your github CR
Edentials to go through the API rate limit
The credentials would be a swapped for a OAuth token stored in C:/USERS/IDIOT/APPD
Ata/roaming/composer/auth.json, your password won't be stored
To revoke access to the token you can visit https://github.com/settings/applica
tions
Username:
2.Your GitHub OAuth token for github.com contains invalid characters: ""
The mistake here is because your GitHub token value is invalid or expired and you need to add a token.
Solution :
1. First you need to update to the latest version: PHP Composer.phar self-update
2. Login to GitHub https://github.com/settings/applications "generated a token" to add a new token
3. Run cmd php composer.phar config-g github-oauth.github.com token (token value for you new)
This will solve the problem, haha!
This article is from the "Shows Technology" blog, be sure to keep this source http://wangzhijun.blog.51cto.com/9660708/1639859
Composer usage issues under Windows