###前提・実現したいこと
PHPでopauthとopauth/twitterをインストールしようとしたら、composer updateで、エラーが起きます。
エラー内容はGitHubのtokenがないという内容です。
OS : Mac OS X El Capitan
###発生している問題・エラーメッセージ
$ php composer.phar update Loading composer repositories with package information Could not fetch https://api.github.com/repos/fuel/docs, please create a GitHub OAuth token to go over the API rate limit Head to https://github.com/settings/tokens/new?scopes=repo&description=Composer+on+{PC名}+2016-10-04+2100 to retrieve a token. It will be stored in "/Users/{ユーザ名}/Documents/workspace/queswer/auth.json" for future use by Composer. Token (hidden): No token given, aborting. You can also add it manually later by using "composer config github-oauth.github.com <token>" Could not fetch https://api.github.com/repos/fuel/docs, please create a GitHub OAuth token to go over the API rate limit Head to https://github.com/settings/tokens/new?scopes=repo&description=Composer+on+{PC名}+2016-10-04+2100 to retrieve a token. It will be stored in "/Users/{ユーザ名}/Documents/workspace/queswer/auth.json" for future use by Composer. Token (hidden): Invalid token provided. You can also add it manually later by using "composer config github-oauth.github.com <token>" [Composer\Downloader\TransportException] Could not authenticate against github.com
###該当のソースコード
bash
1$ php composer.phar update
###試したこと
エラーメッセージ&ググってみると、GitHubからトークンを取得して設定すれば良いとのことで
以下にアクセスして
https://github.com/settings/tokens/new?scopes=repo&description=Composer+on+{PC名}+2016-10-04+2100
generate tokenをします。
取得したtokenをphp composer.phar config github-oauth.github.comで登録します。
bash
1$ php composer.phar config github-oauth.github.com {取得したトークン}
そうすると
/Users/{ユーザ名}/Documents/workspace/queswer/auth.json
ができます。
json:auth.json
1{ 2 "github-oauth": { 3 "github.com": "{取得したtoken}" 4 } 5}
この状態で、
bash
1$ php composer.phar update
をしても、やはり同じエラーが出ます…
下記をフォルダごと削除し
/Users/{ユーザ名}/.composer
/Users/{ユーザ名}/Documents/workspace/queswer/fuel/vendor
再インストールし
bash
1$ php composer.phar install 2$ php composer.phar self-update
再度、試してもやはりtokenエラーとなります。
bash
1$ php composer.phar update
見落としとかありますか?
ハマった方も多いともいます。ご教授ください!
(他に必要な情報があれば、ご指摘いただけると助かります!)
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2016/10/08 11:13