Skip to content

pgloader v4 not pulling in PGPASSWORD env var #1764

Description

@myou11

Hello, when running the pgloader command without providing a password, the command should look for the PGPASSWORD env var, but it does not seem to pick it up as I get the following error message:

$ pgloader mysql://user@remote_host/src_db postgresql://postgres@remote_host/dest_db
Exception in thread "main" org.postgresql.util.PSQLException: The server requested SCRAM-based authentication, but no password was provided.

I have double-checked that the env vars are set and they have the correct password as I've been able to login using the env vars and the respective mysql and psql commands.

I also tried running the pgloader command with the env vars inlined and that works

$ pgloader mysql://user:${MYSQL_PWD}@remote_host/src_db postgresql://postgres${PGPASSWORD}@remote_host/dest_db

Does this have anything to do with how Java accepts env vars?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions