9

laravel/homestead をインストールし、「composer update」を試しました。Composer から、プライベート リポジトリに関する TransportException が返されます。

Composer update
Loading composer repositories with package information
Your GitHub credentials are required to fetch private repository metadata (https://github.com/GrahamCampbell/asset)
A token will be created and stored in "/home/vagrant/.composer/auth.json", your password will never be stored
To revoke access to this token you can visit https://github.com/settings/applications
Username:
Password:
Token successfully created
[Composer\Downloader\TransportException]
The "https://api.github.com/repos/GrahamCampbell/asset" file could not be downloaded (HTTP/1.1 404 Not Found)

このポイントを通過できないので、立ち往生しています。

4

1 に答える 1

7

プライベート リポジトリにアクセスできる場合は、composerでSSH キーを使用できます。

それ以外の場合は、GitHub API Tokensを使用できます。

$ export GITHUB_ACCESS_TOKEN=hash-to-your-api-token
$ composer config -g github-oauth.github.com $GITHUB_ACCESS_TOKEN
$ composer install

Vagrant を使用している場合は、プロビジョナーに環境変数とコンポーザー構成を追加できます。

執筆中、GitHub で新しいアクセス トークンを生成するページは、Settings / Developer settings / Personal access tokensにあります。

于 2015-03-30T12:39:58.037 に答える