heroku / heroku/heroku-buildpack-cli

Add Instructions On How To Authenticate In A Deploy Step

Open
#8 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Shell
Stars
41
Forks
30
PR merge metrics
No merged PRs in 30d

Description

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.

Contributor guide

Open the contributing guide

Research direction

Start with the release script and the Heroku CLI commands shown in the issue, especially authentication during a review app deploy. Determine the recommended ephemeral or machine-user approach, then document the required environment variables and login steps so the database copy works without interactive prompts.

Written by the indexing model from the issue text.

Assessment

Tech stack
shell
Domain
cli, documentation
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
32/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.