Unable to access postgres DB when using `setup-cli`- what's the password?
Bug report
- [x] I confirm this is a bug with Supabase, not with my own application.
- [x] I confirm I have searched the Docs, GitHub Discussions, and Discord.
Describe the bug
Can't authenticate against the db that setup-cli creates. Can't figure out how to obtain/set the correct password.
To Reproduce
The following GitHub Action config fails with error FATAL: password authentication failed for user "postgres" (example log).
The action attempts to set up the correct password in 2 ways:
- Using the password listed at https://supabase.com/docs/guides/self-hosting/docker#accessing-postgres (
your-super-secret-and-long-postgres-password) - Setting the password in a
.envfile as specified at https://supabase.com/docs/guides/self-hosting/docker#update-secrets .
jobs:
supabase-issue-repro:
runs-on: ubuntu-latest
env:
POSTGRES_PASSWORD: your-super-secret-and-long-postgres-password
SUPABASE_CLI_VERSION: 1.148.6
steps:
- name: Configure .env for supabase
run: echo "POSTGRES_PASSWORD=${{ env.POSTGRES_PASSWORD }}" >> .env
- uses: supabase/setup-cli@v1
with:
version: ${{ env.SUPABASE_CLI_VERSION }}
- run: supabase init
- run: supabase start
- env:
PGPASSWORD: ${{ env.POSTGRES_PASSWORD }}
run: psql -h localhost -p 54322 -U postgres -c "CREATE DATABASE test;"
I've also attempted to connect using prisma, but no luck.
Expected behavior
I can interact with the DB using prisma or psql
Screenshots
System information
-
ubuntu-latestGitHub actions runner. - tried with supabase CLI version
1.148.6and1.136.3(version mentioned in README.md)
The local development container password is hardcoded as postgres for simplicity. Do you need to change it?
No, I don’t need to change it! It’s sufficient to just know that the password is ‘postgres’ I suppose.
would you accept a pull request with documentation that specifies the hardcoded password (and unusual port, 54322)? Maybe as an additional advanced example in the README.