Skip to content

pgpass not used? #527

Open
Open

Description

@jevansbio

The documentation states that if certain arguments are NULL, a .pgpass or pgpass.conf file will be used to get the username and password. However I don't seem to be able to make this work, even when explicitly setting the passfile argument when making the connection.

R can definitely find the file just fine, and I suppose I could resort to manually loading the file. However I am unsure as to why this seems to fail.

I have other clients on the same system that use the pgpass method of authentication with no trouble.

Is this a bug, or am I missing something?

Activity

  1. toppyy commented on Nov 27, 2025

    @toppyy
    Contributor

    I was able to connect with .pgpass.

    I found it helpful to try to connect to a local postgres instance. The docs state that you can replace of the elements with an asterisk, effectively matching anything. It maybe helpful to add a line like hostname:port:*:*password to .pgpass to match against any database & user to pinpoint the issue?

    Also, it may be worthwhile to the check the permissions on .pgpass if you're on linux (see docs).

    Admittedly the error message (failed: fe_sendauth: no password supplied) can be a bit misleading when trying to get the config right.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions