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

Not able to access ledger Unauthorized error #431

Closed
THEViveKL opened this issue Jul 28, 2017 · 5 comments
Closed

Not able to access ledger Unauthorized error #431

THEViveKL opened this issue Jul 28, 2017 · 5 comments
Labels

Comments

@THEViveKL
Copy link

Hi,

After doing all the things when i execute this command on docker as follows:

docker run -d -e LEDGER_PORT=1337 -e LEDGER_ADMIN_PASSWORD=admin -e LEDGER_DB_URI=postgres://postgres:password@db --link five-bells-ledger-db:db -p 1337:1337 -h localhost --name fivebells interledger/five-bells-ledger

It executes successfully. but when i tried for this URL it requires authentication.

http://localhost:1337/health

I want to know username and password for accessing above URL?.
i have tried with admin:admin which is given in curl command.
but got same "Unauthorized error" .

curl -i -sS -X PUT --user admin:admin -H "Content-Type: application/json" -d'{ "name" : "alice", "password" : "alice", "balance" : "20000" }' http://localhost:1337/accounts/alice

@adrianhopebailie
Copy link
Contributor

I'd recommend getting onto the Gitter chat for support: https://gitter.im/interledger/Lobby

At first glance I think your issue is that you need to use that username and password to generate a token for HTTP Basic auth, not pass it in the request object.

@THEViveKL
Copy link
Author

@adrianhopebailie
how to get username and password
Thank for suggestion i have joined gitter for issue discussion.

@michielbdejong
Copy link
Contributor

It seems the admin user is not being created on first run.

@sentientwaffle
Copy link
Contributor

Admin user should be created when ledger starts (see seed-db.js).

There is a typo in the README -- ADMIN_PASSWORD should be ADMIN_PASS. That probably isn't the issue here, though, since the admin user/pass should just get set to the default values.

@michielbdejong
Copy link
Contributor

This was fixed in #432, sorry for not closing this issue when that was merged.

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