First time trying to install a plugin, getting: FATAL: Peer authentication failed for user "discourse"


(Marcelo Delgado) #1

Trying to install the hide-posts plugin. After a clean discourse_docker install. I ssh into the app and run these commands:

RAILS_ENV=production bundle exec rake plugin:install repo=http://github.com/discourse/discourse-hide-post 
RAILS_ENV=production bundle exec rake assets:precompile

The precompile fails with

rake aborted!
FATAL:  Peer authentication failed for user "discourse"

What am I doing wrong?


(Sam Saffron) #2

Never run that, simply run this if you must:

 rake plugin:install

Of course this is terrible practice, cause you want plugins in your container definition, just like docker_manager is:

hooks:
  after_code:
    - exec:
        cd: $home/plugins
        cmd:
          - mkdir -p plugins
          - git clone https://github.com/discourse/docker_manager.git
          -  ---> MORE PLUGINS GO HERE <---

(Rex) #3

I got the same error when I run this command. Should I set some password to the pg user “discourse”?
My workaround is change the db username in discourse_defaults.conf, then run the command. I would change that back when I finish the command.