gpt4 book ai didi

php - composer update 给出关于私有(private)存储库元数据的 404

转载 作者:可可西里 更新时间:2023-11-01 12:35:29 25 4
gpt4 key购买 nike

我安装了 laravel/homestead 并尝试了'composer update'。Composer 给我一个关于私有(private)仓库的 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)

我无法通过这一点,所以我被卡住了。

最佳答案

如果您有权访问私有(private)仓库,您可以使用 SSH Keyscomposer .

否则你可以使用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,则可以在您的供应商中添加环境变量和 Composer 配置。

在编写页面以在 GitHub 上生成新的访问 token 时,可以在 设置/开发人员设置/ Personal access tokens 下找到.

关于php - composer update 给出关于私有(private)存储库元数据的 404,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29335387/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com