Can't `supabase db pull` Error: SSL connection is required
I found this issue on github - https://github.com/supabase/cli/issues/1969
Tried
supabase logout
, supabase login
, supabase unlink
, supabase link --project-ref <project-id>
, supabase db pull --debug
But I still get the error SSL connection is required
I tried asking on reddit - https://www.reddit.com/r/Supabase/comments/1mtjfuk/cant_supabase_db_pull_error_ssl_connection_is/18 Replies
Here is the log for
supabase db pull --debug
I also tried without the debug flag
supabase db pull
and this is what I see
You likely have ssl enforced for db connection. You can disable it here https://supabase.com/dashboard/project/_/database/settings or download the certificate and add it in
~/.postgresql/root.crt
Also the --debug
flag seems to be incompatible with ssl mode at the moment https://github.com/supabase/cli/issues/1969Should I restart the service or something? I added the certificate to
~/.postgresql/root.crt
and ran supabase db pull
and still get the same errorWhat is your cli version?
2.34.3
I only got this error when I entered the wrong db password
I tried unlinking and relinking. stopped and restarted the supabase services. What else can I try?
Are you sure about the password?
But I don't enter a db password anywhere
I follow this doc to make changes in my local db and push changes to my remote db
https://supabase.com/docs/guides/local-development/overview
Thats strange. I've to add db password everytime I run pull cmd.
Which version of the CLI are you using?
same as yours
Hm. What is going on? It was working last time I pushed a migration (a few months ago).
Applying migration 20250730000001_<>.sql...This is the new migration. At this step it fails with the error
Try disabling ssl enforcement and see if that works
Yes db pull worked. But it also created a
remote_schema
migration file. I didn't make any migration via the dashboard. I don't know whats going on.
But thanks you for your help. This issue should be resolved.
(My last migration was a year ago. Maybe supabase updated pg?)it creates a remote schema file to keep changes in sync with remote
Very much likely
Thanks a lot @inder