Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SSL fails on the 0.7.xx #516

Closed
kevbook opened this issue Oct 3, 2014 · 3 comments
Closed

SSL fails on the 0.7.xx #516

kevbook opened this issue Oct 3, 2014 · 3 comments
Labels

Comments

@kevbook
Copy link

kevbook commented Oct 3, 2014

This is what i get on 0.7.xx - but 0.6.22 works fine. I need it to connect to heroku pg.

{ [error: no pg_hba.conf entry for host "69.180.68.165", user "fedgqabajgfoik", database "dbrqbkbd9pmvci", SSL off]
  name: 'error',
  length: 160,
  severity: 'FATAL',
  code: '28000',
  detail: undefined,
  hint: undefined,
  position: undefined,
  internalPosition: undefined,
  internalQuery: undefined,
  where: undefined,
  file: 'auth.c',
  line: '486',
  routine: 'ClientAuthentication' }

// The way i connect is:
  var knex = require('knex')({
    client: 'pg',
    debug: true,
    connection: 'postgres://user:pass@host:5432/db?ssl=true'
  });
@gregbty
Copy link

gregbty commented May 30, 2015

I seem to be having this issue as well in version 0.8.6.

@angelxmoreno
Copy link

I am also on 0.8.6 and also getting the same issue. I am attempting to connect to a postgres db on Heroku

@angelxmoreno
Copy link

For now, this works:

var Knex = require('knex');
var URL = require('url');
var pg_server = URL.parse(process.env.DATABASE_URL);
var knex = Knex({
    client: 'pg',
    connection: {
        host: pg_server.hostname,
        port: pg_server.port,
        user: pg_server.auth.split(':')[0],
        password: pg_server.auth.split(':')[1],
        database: pg_server.path.substring(1),
        ssl: true
    }
});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants