为什么我无法使用 composer 从 github 创建新项目?

Why i can't create a new project from github using composer?

我在 GitHub 上创建了一个新的存储库。我已经使用 GitHub Desktop 来提交所有文件。一切都完成了。但是我无法使用 Composer 创建新项目。 这是我的存储库: https://github.com/xttrust/CodeIgniter-HMVC-EXTRA

我试过像这样创建一个新项目:

composer create-project xttrust/CodeIgniter-HMVC-EXTRA

我在 GitBash 中收到此错误:

[InvalidArgumentException]
Could not find package xttrust/codeigniter-hmvc-extra with stability stable.

create-project [-s|--stability STABILITY] [--prefer-source] [--prefer-dist] [--repository REPOSITORY] [--repository-url REPOSITORY-URL] [--dev] [--no-dev] [--no-custom-installers] [--no-scripts] [--no-progress] [--no-secure-http] [--keep-vcs] [--remove-vcs] [--no-install] [--ignore-platform-reqs] [--] [<package>] [<directory>] [<version>]

克里斯:

Have you submitted it to Packagist?

我不得不将它与 Packagist 合并,然后它就可以工作了。

没有问题,因为错误是正确的。尝试搜索 Packagist。您需要提交 github 存储库 https://github.com/xttrust/CodeIgniter-HMVC-EXTRA