Suggested feature: Have the Build a Binderhub process check that your credentials are correct

This is an idea that came up at the Build a BinderHub workshop in Sheffield on 18 March.

Basically, we had a couple of people have difficulty building their BinderHub because they had typos in their configuration files. :woman_facepalming::man_facepalming:

The idea is that there could be either a script that you run locally, or (better) an integration to the BinderHub commands, that checks whether your secret :lock: information is correct:

  • DockerHub
  • Check internal IP address
  • GitHub authentication?

What do you think?


Technical note: it is possible to check dockerhub credentials using curl and the docker api:

UNAME=drj11 # use you dockerhub id here
UPASS=xyzzy # your dockerhub password
curl -s -H "Content-Type: application/json" -X POST -d '{"username": "'${UNAME}'", "password": "'${UPASS}'"}'

success will result in a large block of JSON (a valid login token!); failure results in

{"detail": "Incorrect authentication credentials."}

Ideally a test tool would extract this username and password from the config.yaml, but that is one of the next steps I suppose.

Even more ideally we would use a token from docker not my username/login combo (but I know that is a larger change).


nice! maybe a good first step would be to write such a script for yourself, and then we can point to it as a part of the documentation. In the past we have often highlighted useful tools that others have created, but that for one reason or another we don’t “officially” support yet. What do you think?

1 Like

If the way to check the credentials is a curl command like the above it could even be a callout in the zero-to-binderhub docs at the right place. It wouldn’t cover extracting it from the config file but maybe that is already a good enough start?