database push failing due to wrong key expiration date
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 55/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- postgresql, typescript
Research direction
Start by reproducing the failure with npx supabase db push and review the CLI path that initializes the login role, using the reported SQL and valid until timestamp as the starting point. Trace how the expiration date is generated and verify that the command completes successfully without the permission error in both local use and GitHub Actions.
Written by the indexing model from the issue text.
Description
Describe the bug
Error when pushing to the DB, both locally and in Github Actions. It seems that a key is being generated with the wrong validity (5m - 60m).
npx supabase db push
Initialising login role...
unexpected login role status 400: {"message":"Failed to create login role: ERROR: 42501: permission denied to alter role\nDETAIL: Only roles with the CREATEROLE attribute and the ADMIN option on role \"cli_login_postgres\" may alter this role.\nCONTEXT: SQL statement \"alter role cli_login_postgres with password 'aaaaaaaaaaaaaaaaaaaa' valid until '2026-04-15 22:25:23.223853+00'\"\nPL/pgSQL function inline_code_block line 13 at EXECUTE\n"}
2026-04-15 22:25:23.223853+00 was 55 minutes before I ran the command.
To Reproduce
Steps to reproduce the behavior:
npx supabase db push
Expected behavior
A clean db push.
System information
Rerun the failing command with --create-ticket flag.
- Version of OS: macos 26.4.1
- Version of CLI: 2.91.1
- Version of Docker: 29.3.0, build 5927d80c76
- node: v24.14.0
- Versions of services:
SERVICE IMAGE | LOCAL | LINKED
------------------------|------------------------|------------
supabase/postgres | 17.6.1.063 | 17.6.1.063
supabase/gotrue | v2.188.1 | v2.188.1
postgrest/postgrest | v14.1 | v14.1
supabase/realtime | v2.82.0 | -
supabase/storage-api | v1.53.0 | v1.53.0
supabase/edge-runtime | v1.73.3 | -
supabase/studio | 2026.04.08-sha-205cbe7 | -
supabase/postgres-meta | v0.96.4 | -
supabase/logflare | 1.37.1 | -
supabase/supavisor | 2.7.4 | -
Additional context
Timezone Europe/Lisbon
- Dominant language
- TypeScript
- Stars
- 2.4k
- Forks
- 523
- Avg merge
- 21h 33m
- Merged PRs (30d)
- 258
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from supabase/cli
-
🐛 Bug supabase/cli
-
🐛 Bug supabase/cli
-
Local Kong keeps idle upstream connections longer than PostgREST, causing sporadic 502 on POST/PATCH Open🐛 Bug supabase/cli
-
✨ Feature supabase/cli
-
🐛 Bug supabase/cli
Similar issues
-
clawsweeper:fix-shape-clear clawsweeper:queueable-fix clawsweeper:source-repro impact:ux-friction issue-rating: 🦞 diamond lobster no-stale P3
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Difficulty 1/5 Under an hour Newbie friendliness 76/100
-
code-quality refactoring
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
github/gh-aw-firewall#8816 ·
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
langchain-ai/deepagents#6450 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
vercel/react-tweet#225 ·