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

gitrob configure failing with bad URI #63

Closed
binarymist opened this Issue Apr 17, 2016 · 2 comments

Comments

Projects
None yet
2 participants
@binarymist
Copy link

binarymist commented Apr 17, 2016

Hi.

gitrob configure

|| |_ ___ | |
| . | | | | . | . |
|
|
|
| |
| |_
|_|
|
_| By @michenriksen

[] Starting Gitrob version 1.1.0 at 2016-04-17 12:21 NZST
[
] Starting Gitrob configuration wizard
Enter PostgreSQL hostname: |localhost|
Enter PostgreSQL port: |5432|
Enter PostgreSQL username: |gitrob|
Enter PostgreSQL password (masked): xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Enter PostgreSQL database name: |gitrob|
Enter GitHub access tokens (blank line to stop):

[] Saving configuration to /root/.gitrobrc done
[
] Loading configuration... done
[*] Preparing database... failed
[!] URI::InvalidURIError: bad URI(is not URI?): postgres://gitrob:o[7&MI).@c@localhost:5432/gitrob

 
 
postgresql is running on localhost and listening on 5432
 

ss -ant
State Recv-Q Send-Q Local Address:Port Peer Address:Port
LISTEN 0 128 127.0.0.1:5432 :
ESTAB 0 0 :42772 192.30.252.91:443
CLOSE-WAIT 1 0 :39326 52.71.215.230:443
CLOSE-WAIT 1 0 :40460 103.245.222.133:443
CLOSE-WAIT 1 0 :39236 192.30.252.121:443
CLOSE-WAIT 1 0 :40458 103.245.222.133:443
CLOSE-WAIT 0 0 :40464 103.245.222.133:443
CLOSE-WAIT 290 0 :40514 103.245.222.133:443
CLOSE-WAIT 0 0 :40462 103.245.222.133:443
CLOSE-WAIT 0 0 :40466 103.245.222.133:443
CLOSE-WAIT 1 0 :47948 192.30.252.126:443
ESTAB 0 0 :38170 216.58.199.46:443
CLOSE-WAIT 13 0 :46696 :445
CLOSE-WAIT 290 0 :40512 103.245.222.133:443
LISTEN 0 128 ::1:5432 :::*
CLOSE-WAIT 171 0 ::1:34786 ::1:5432
ESTAB 0 0 ::1:5432 ::1:37390
ESTAB 0 0 ::1:37390 ::1:5432

@michenriksen

This comment has been minimized.

Copy link
Owner

michenriksen commented Apr 17, 2016

I guess the problem is because the postgresql password contains an @ sign, which causes the connection URI (postgres://<username>:<password>@<host>:<port>/<database>) to be invalid.

I'll look into a way to escape @ signs when constructing the connection URI. In the meantime, you can fix it by removing it from the password.

@binarymist

This comment has been minimized.

Copy link

binarymist commented Apr 17, 2016

That's it. Didn't recognise the password due to being in a password database which allows me to never have to look at them.

@binarymist binarymist closed this Apr 17, 2016

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