pgloader v4 not pulling in PGPASSWORD env var
Nobody has claimed this yet.
- Dominant language
- Common Lisp
- Stars
- 6.5k
- Forks
- 613
- Avg merge
- 3h 46m
- Merged PRs (30d)
- 1
Description
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?
Contributor guide
No contributing guide indexed for this repository
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.
Research direction
Start by tracing the pgloader command path that builds the PostgreSQL connection when no password is included in the URI, using the reported PGPASSWORD and SCRAM authentication case. Compare that behavior with the working inline-password invocation. Done means pgloader discovers the environment-provided password and completes the migration without requiring it in the connection URI.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- mysql, postgresql
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100