In this post, I want to share how I resolved a frustrating issue when deploying Laravel Nova to the DigitalOcean App Platform. Specifically, I encountered the error:
"Missing or incorrect username/password combination"
This occurred during the build process when trying to install Nova via Composer. It turns out, Nova requires authentication through GitHub to download the package, and this needs to be set up correctly within DigitalOcean’s environment settings.
Step 1: Follow the Nova Installation Docs
First, make sure you're following the official Nova installation guide. This outlines how to configure Composer to authenticate with your Nova credentials.
Step 2: Add Authentication Details in DigitalOcean
To get Composer to authenticate properly during deployment, you need to add your credentials to the environment variables of your DigitalOcean App. Here's how:
Go to your DigitalOcean App.
Navigate to the Settings tab.
Open the Environment Variables section.
Then, add the following variables:
[email protected]
NOVA_LICENSE_KEY=your_license_key
COMPOSER_AUTH={"http-basic":{"nova.laravel.com":{"username":"[email protected]","password":"your_license_key"}}}
Note: Replace the placeholders with your actual Nova credentials. Your Nova license key can be found in your Nova dashboard.
That’s It!
After saving these environment variables, my deployment went through successfully without authentication errors.
I hope this helps anyone else running into the same problem. If you’ve got questions or ran into a different solution, feel free to share!