I installed laravel/homestead and tried 'composer update'. Composer gives me an TransportException about a private repo.
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)
I can't pass this point so I'm stuck.
update / u# In order to get the latest versions of the dependencies and to update the composer. lock file, you should use the update command. This command is also aliased as upgrade as it does the same as upgrade does if you are thinking of apt-get or similar package managers.
To update your packages json file is. Run composer update (on your local machine) to update the required packages and re-generate a composer. lock file. Commit the updated composer.
A repository is a package source. It's a list of packages/versions. Composer will look in all your repositories to find the packages your project requires. By default, only the Packagist.org repository is registered in Composer. You can add more repositories to your project by declaring them in composer.
If you have access to the private repo, you can use SSH Keys in composer.
Otherwise you can use GitHub API Tokens.
$ export GITHUB_ACCESS_TOKEN=hash-to-your-api-token
$ composer config -g github-oauth.github.com $GITHUB_ACCESS_TOKEN
$ composer install
If you are using Vagrant, you can add an environment variable and the composer configuration in your provisioner.
At the moment of writing the page to generate a new access token on GitHub can be found under Settings / Developer settings / Personal access tokens.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With