Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

tetradude's avatar

Spark install fails to production server

Hi Guys,

I developed a spark project on my vagrant machine and now trying to deploy my project to the production server (Ubuntu).

First, I pulled my project repo to the production server. Then I executed "composer install" command but received this error:

Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
  - Installing laravel/spark (v1.0.14)
    Downloading: Failed       
    Failed to download laravel/spark from dist: The "https://api.github.com/repos/laravel/spark/zipball/ac06613a5e7781132a046aea7f3fe4bccc3d6d90" file could not be downloaded (HTTP/1.1 404 Not Found)
    Now trying to download from source
  - Installing laravel/spark (v1.0.14)
    Cloning ac06613a5e7781132a046aea7f3fe4bccc3d6d90

                                                                                                                                                                                                                                                                               
  [RuntimeException]                                                                                                                                                                                                                                                           
  Failed to execute git clone --no-checkout 'https://***:***@github.com/laravel/spark.git' '/var/www/testproject/vendor/laravel/spark' && cd '/var/www/testproject/vendor/laravel/spark' && git remote add composer 'https://***:***@github.com/laravel/spark.git' &&  
   git fetch composer                                                                                                                                                                                                                                                          
  Cloning into '/var/www/testproject/vendor/laravel/spark'...                                                                                                                                                                                                              
  remote: Repository not found.                                                                                                                                                                                                                                                
  fatal: repository 'https://***:***@github.com/laravel/spark.git/' not found

I understand that this is something related to Github Spark repo. But how do I set authorization for Github Spark repo?

Please help, I am unable to deploy my project.

Regards.

0 likes
16 replies
brynnb's avatar

Did you ever find a solution for this? I'm trying to deploy my Spark app on Heroku and I'm having difficulty making Heroku have access to the private repo. I've tried several variations of including my Github auth token in composer.json and tried using this buildpack that's supposed to fix this, both with no luck. Keep getting 404 not found for the Spark repo.

eddsmith's avatar

I fixed this by creating a fresh installation of laravel 5.3. Then using the spark installer, to install Spark 2.0. When i tried to deploy it, it just worked this time round.

everetts's avatar

If you've created your own repository and are installing it on forge, this is the only way I found to get it to work. Basically, you have to bypass the scripts part of the composer update and then you have to give a new key if you haven't already (assuming your github/bitbucket account is already subscribed to the spark private repo)

Uncheck install composer dependencies when installing repository. composer update --no-scripts -o This forces a new key from github/bitbucket to be pasted, and it gives the link to add it. php artisan key:generate php artisan migrate (only for creating a new database)

dshields's avatar

@brynnb

You don't need to use the custom buildpack for this, Heroku supports private access tokens using COMPOSER_GITHUB_OAUTH_TOKEN, you just need to belong to the laravel/spark repository and create a custom token on github with the 'repo' scope included, the same as described in the custom buildpack documentation.

https://devcenter.heroku.com/articles/php-support#custom-github-oauth-tokens

Then you'll be able to composer install laravel/spark on Heroku.

1 like
JonoThorne's avatar

If you're still struggling with this, you could just download a zip of the repository, unzip it and then run the spark install, providing you have added the path in your bashrc file.

mailnike's avatar

@alivemedia can you please elaborate your installation steps? I downloaded a zip, unzipped - but then if I directly enter spark install - UBUNTU says command not found (it is looking for apache spark). I understand I need to add path in bashrc but how did you do it?

JonoThorne's avatar

@mailnike have you installed spark via Composer? You'll need to do that. If then the spark command still doesn't work, the location of your composer bin needs to be added as a path. I'm not sure of how this works in Linux, but on a Mac, there is a file called .bashrc in your home folder.

number6's avatar

I use DigitalOcean for most hosted applications. I am also looking for a good composer style process that works with my private custom spark repo. I typically provision servers and deploy features with ansible.

Since no one seems to have addressed this (that I have seen), I'll take a stab at it when I get to deployment.

eddsmith's avatar

...I had this problem again when deploying to a production server using envoyer.

This time I got around it by SSH'ing into the prod server in question. Finding the failed enjoyer release and running 'composer install' manually. I was then prompted to generate a token at github. I followed the instructions in the terminal and now it all works fine and dandy.

Please or to participate in this conversation.