Skip to content

CLI login

Terminal window
amendable login

Optional flags from amendable login --help:

Terminal window
amendable login --hostname my-laptop
amendable login --poll-seconds 1

--hostname is the label shown on the grant page. It defaults to this machine’s hostname. --poll-seconds is how often the CLI polls until the grant succeeds. Default is 2.

What happens:

  1. POST /v1/auth/sessions with this machine’s hostname (or --hostname)
  2. The CLI prints a short code and https://amendable.io/access-tokens/create?auth_session_id=...
  3. Your browser opens. Confirm the code. Grant a token (Grant All is fine for a laptop)
  4. The CLI polls https://api.amendable.io until 200 and writes the secret to the config file

If you cannot use a browser, create a token in the UI and:

Terminal window
export AMENDABLE_TOKEN='...'
# or put token = "..." in the config file
amendable whoami
Terminal window
amendable logout

removes the stored token.

Terminal window
git config --global credential.https://amendable.io.helper '!amendable git-credential'

Then git clone https://amendable.io/r/USER/REPO.git does not need the token in the URL. The helper only implements get.