Skip to content

Add Instructions On How To Authenticate In A Deploy Step  #8

Description

@alexfinnarn

I'm trying to run a release script to copy a database from a staging environment to a review app.

  # In release script...
  heroku config:set HEROKU_API_KEY=`heroku auth:token`
  heroku pg:copy stage-app-name::$DATABASE_URL $DATABASE_URL -a $HEROKU_APP_NAME --confirm $HEROKU_APP_NAME

But I get authentication errors.

 ›   Error: not logged in
 ›   Error: Missing required flag:
 ›     -a, --app APP  app to run command against
 ›   See more help with --help
 ▸    Invalid credentials provided.
heroku: Press any key to open up the browser to login or q to exit:  ▸    Invalid credentials provided.
Enter your Heroku credentials:
Email: 

So, I'm trying to figure out how to login the best way in a review app environment in order to use the CLI commands during the release phase. Is the recommended way to use a permanemtn machine user? Or to do it in a more ephemeral way each release?

I think I can add a user, store creds in environmental variables, and then use those to login, but I'm not sure of the best option. I figure plenty of other people want to do this or have accomplished it already.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions