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

Mick79's avatar

Can't install nova in production (Heroku)

Hi there,

My build is failing in production because heroku is requiring my nova login details to install the package.

I don't know how to get around this. Any ideas?

0 likes
8 replies
ejdelmonico's avatar
Level 53

did you use an auth.json file in the project root? I am not sure if Heroku will pick up on that but it should. That file allows you to give credentials for a composer repo. Something like:

{
    "http-basic": {
        "nova.laravel.com": {
            "username": "[email protected]",
            "password": "HelloWorld"
        }
    }
}
4 likes
Mick79's avatar

That was the problem. Thanks so much!

solarsoft0's avatar

Please how did you solve this issue, tried using the auth.json on heroku but no luck

martinbean's avatar

@Mick79 As a note: it’s probably better to add your authentication credentials as an environment variable rather than hard-coding your email address and password in your application’s composer.json file.

I recently wrote a blog post on how to do this (albeit for Bitbucket private repositories), but the concept is the same—you’d just create an environment variable in your Heroku application called COMPOSER_AUTH with the same JSON blob @ejdelmonico provided.

4 likes
Mick79's avatar

Thanks a lot @martinbean i’ll look into this for sure.

@okanlawonema please see the answer that I marked as correct. That is how I solved the problem.

webinarincadmin's avatar

how did you solved it? do you create a new file for auth.json or did you put it inside composer json? thanks

martinbean's avatar

Try reading the resource the OP was linked to two years ago that explained exactly what to do in this scenario.

solarsoft0's avatar

@MICK79 - having this information on a public even private repo is not actually nice, i solved it buy providing an environmental variable to Heroku COMPOSER_AUTH=<auth.json content>

but if you are getting invalid JSON, go the dashboard and remove the quote surrounding the JSON

Please or to participate in this conversation.