Skip to content

Unable to access postgres DB when using setup-cli- what's the password? #271

@jason-curtis

Description

@jason-curtis

Bug report

  • I confirm this is a bug with Supabase, not with my own application.
  • 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:

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

image

System information

  • ubuntu-latest GitHub actions runner.
  • tried with supabase CLI version 1.148.6 and 1.136.3 (version mentioned in README.md)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions