Background
We have a PHP project that was working fine with Travis CI until a certain point and since then has totally stopped working. The project is simply failing to build with Composer.
Details
The last successful build was: this one
The most recent failed build was:
this one, in the branch Naming Collisions
which is this commit
The error that keeps coming up is:
Failed to execute git clone --mirror 'git@github.com:edmondscommerce/Faker.git' '/home/travis/.composer/cache/vcs/git-github.com-edmondscommerce-Faker.git/'
latest branch is NamingCollisions
, this is the latest commit
Notice in the composer.json we are using a fork for the Faker library:
"repositories": [
{
"type": "vcs",
"url": "https://github.com/edmondscommerce/Faker.git"
}
],
This all works fine for our local tests, it only fails in Travis.
Things we have tried:
flushing Travis caches
clearing composer caches before doing the install -
.travis.bash
adding:
"github-protocols": ["https"]
to the composer.json
- Hoping it will just go away...
No luck so far.
Unfortunately we're now just testing locally and ignoring Travis because it is consistently failing now even though the code is working fine.
Hopefully one of you readers can help figure this one out!
What we went with
In the end we decided to add "no-api": true
to the repositories
config as suggested by Everon.
This forces composer to no longer make use the github API (docs):
If you set the no-api key to true on a github repository it will clone the repository as it would with any other git repository instead of using the GitHub API.