How to properly deploy Nova at Laravel Forge
Here is how you can add Nova to your fresh Laravel project that deployed via Forge
If you want to use Nova admin package on your Laravel project, and deploy it to forge. You probably will get this error
Unable to find Nova (Silver Surfer) license holder with the given email address: [].
************************************************************************************
Failed to download laravel/nova from dist: The 'https://nova.laravel.com/dist/laravel/nova/laravel-nova-xxx-zip-xxx.zip' URL could not be accessed (HTTP 403): HTTP/2 403
Now trying to download from source
It’s caused by there is no “user and password” information for authenticating Nova.
There are two ways to solve this, depend on your state:
- Fresh Laravel project on Forge
- Existing Laravel project on Forge
1. Fresh Laravel project on Forge
Don’t auto intall composer package
For fresh installed project, you need to install it “without install composer package” first. So when selectign you Git repo on Forge, uncheck the install composer.
Add auth.json via Forge
Once the git repository is installed, you can use the Packages panel to store your Nova repository credentials into your site’s auth.json file and run a deployment.
Steps:
- At forge (on your current site) > Go to Packages panel
- Add repository url ‘nova.laravel.com’
- Add your Nova’s account email as username
- Add your Nova’s account password as password
- save
Deploy now!
- Go to ‘commands tab’ at Forge (at ur site setting)
- Run ‘composer install’, to install all packages
2. Existing Laravel project
If you have an existing laravel project that already deployed at Forge, and want to add Nova to it.
- You can follow how to ‘add auth.json’ section above
- or run the command via commands tab
composer config http-basic.nova.laravel.com NOVE_EMAIL NOVA_KEY