Cloud Foundry cf push command fails to download external buildpacks
The Cloud Foundry cf push -b https://<buildpack_path> commands fail.
Symptoms
The following error message is displayed during the deployment of an application that uses an external buildpack.
Staging...
Failed to clone git repository at https://github.com/cloudfoundry-community/jboss-buildpack.git
Exit status 1
Resolving the problem
Complete the following steps to identify the root cause of the problem:
- Deploy a simple application.
- Open a session in the container that holds the application:
cf ssh <simple_app>. - Navigate to the
tmpdirectory:cd /tmp. - Clone the buildpack into your
tmpdirectory:git clone <buildpack>. - Check for errors as shown in the following example:
git clone https://github.com/cloudfoundry-community/jboss-buildpack.git Cloning into 'jboss-buildpack'... fatal: unable to access 'https://github.com/cloudfoundry-community/jboss-buildpack.git/': Problem with the SSL CA cert (path? access rights?)
SSL CA Cert issue
The certificates that are being used are probably self-signed. Complete the following steps to work around the problem:
- Download the buildpack to a location, such as the inception container, where the Cloud Foundry CLI is configured.
-
Add the buildpacks. For information about adding buildpacks, see Add a buildpack
. Be sure to choose the correct position for the buildpack when you place the buildpack in the list of currently available Cloud Foundry buildpacks. Note that Cloud Foundry makes buildpack selections based on the bundle application extension. For example, if you want to use jboss-buildpack and you deploy a .war file, you must verify that the jboss-buildpack is positioned before any other buildpacks which also manage .war files.
cf create-buildpack <BUILDPACK_NAME> <DOWNLOADED_BUILDPACK_PATH> <POSITION> -
Use the following command to re-deploy the application:
cf push -b <BUILDPACK_NAME>