Heroku的PG:拉密码验证失败 [英] heroku pg:pull password authentication failed

查看:224
本文介绍了Heroku的PG:拉密码验证失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图运行 Heroku的PG上拉电阻:命令,但我似乎无法得到惊人的神秘身份验证过程。

I'm trying to run the heroku pg:pull command, but I can't seem to get the amazingly cryptic authentication process.

我运行命令:

> heroku pg:pull app_name::RED localdb

然后我得到一个密码提示,我不能,因为我的生活,找出。经过2猜测我得到密码验证失败,用户哈南,仅此而已。

我试过Heroku的密码,我的Windows帐户的密码,我每次使用的密码,但没有任何反应。我查了一下,而哈南不是PostgreSQL中的作用,因此试图改变通过psql的密码不起作用。我没有问题,登录通过其他角色到PostgreSQL,但是它的这种默认的登录过程,我似乎无法破解。

I tried Heroku's password, my Windows account password, every password I use, but nothing happens. I checked, and "Hanan" is not a role in Postgresql, so trying to change the password through psql doesn't work. I have no problem logging in to Postgresql through other roles, but it's this 'default' log-in process which I can't seem to crack.

此外,由于我使用Windows,我不知道如何像 sudo的-u的Postgres的psql ,这是我看到的一个可能的解决方案运行命令。

Also, since I'm using windows, I'm not sure how to run commands like sudo -u postgres psql, which I see as a possible solution.

威尔AP preciate对这个问题的任何帮助,我真的现在沮丧...

Will appreciate any help regarding this issue, I'm really frustrated by now...

推荐答案

显然,这是可能的设置环境变量PGUSER和PGPASSWORD,所描述的这里

Apparently it's possible to set the environment variables PGUSER and PGPASSWORD, as described here.

然而,这将不会对在给定的语法窗口工作。要做到这一点上运行以下窗口:

However, this won't work on windows in the given syntax. To do this on windows run the following:

SET PGUSER = [pg_username]

SET PGUSER=[pg_username]

SET PGPASSWORD = [pg_password]

SET PGPASSWORD=[pg_password]

进入这两条线后,Postgres将在您登录与给定的身份验证信息,而不是试图与Windows用户名登录

after entering these two lines Postgres will log you in with the given authentication info, instead of trying to sign in with the windows username

这篇关于Heroku的PG:拉密码验证失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆