We have several private repositories that we would like to include in a PHP application using Composer. The file composer.jsoncontains this entry, which defines our first private repository:
"repositories": [
{
"type": "vcs",
"url": "https://github.com/vendor/package.git"
}
]
Then we need a repository, as usual:
"require": {
"vendor/package": "~1.0.0"
}
The only thing I did was set the private access token on GitHub and save it in the composers file auth.json. It looks like this:
{
"github-oauth": {
"github.com": "<my_access_token>"
}
}
It all looks like Composer is properly configured to access GitHub via HTTPS using an access token, but we get errors that look like this:
[RuntimeException]
Failed to clone https:
- https:
Cloning into bare repository '/home/vagrant/.composer/cache/vcs/https---github.com-vendor-package.git'...
remote: Invalid username or password.
fatal: Authentication failed for 'https://github.com/vendor/package.git/'
The access token is valid because I used it to overcome the speed list exceeded above, and it appears on GitHub as recently used.
? , Composer GitHub. Satis Trojan - , . , , .