#6587·beads

bd dolt push/pull cannot authenticate to a Dolt remote that requires HTTP basic auth

Author: goernCreated Sep 16, 2026Updated Sep 16, 2026

Summary

bd dolt push and bd dolt pull fail against a self-hosted Dolt remote that requires HTTP basic auth. bd invokes Dolt's push/pull without the --user argument, so the Dolt client never sends an Authorization: Basic header, and the remote rejects the request as unauthenticated. There is no bd configuration key that supplies remote credentials, so the failure cannot be worked around from within bd.

Environment

  • bd version 1.2.2 (6c124203e)
  • Backend: dolt, dolt_mode: server, shared server
  • Remote: a self-hosted Dolt server behind HTTP basic auth (https://<host>/<db>)

Reproduction

  1. Configure a Dolt remote that requires basic auth as origin.
  2. Export DOLT_REMOTE_USER and DOLT_REMOTE_PASSWORD.
  3. Run bd dolt push.

Observed:

Error: dolt push failed: Error 1105 (HY000): failed to get remote db; the remote: origin
'https://<host>/<db>' could not be accessed; could not access dolt url 'https://<host>/<db>':
rpc error: code = Unauthenticated desc = bad request: authorization header did not start with 'Basic '

bd dolt pull fails the same way.

The identical operation succeeds when --user is passed through to the Dolt stored procedure:

bash
dolt --data-dir <data-dir> --use-db <db> \
  sql -q "call dolt_push('--user', '$DOLT_REMOTE_USER', 'origin', 'main')"

with DOLT_REMOTE_PASSWORD present in the environment. That is the workaround we ship: a shell script wrapping dolt_push()/dolt_pull(), invoked from a just target, replacing bd dolt push/bd dolt pull entirely.

Expected

bd forwards remote credentials to Dolt when they are configured, so bd dolt push and bd dolt pull work against basic-auth remotes.

Suggested fix

Add a configuration key (for example dolt.remote-user, defaulting to $DOLT_REMOTE_USER) and pass it as --user to dolt_push()/dolt_pull() when set. bd dolt set user currently configures the local MySQL user for the sql-server, which is a different thing and cannot be reused for this.

Impact

Without this, bd dolt push silently never succeeds on such a remote. In our case two machines each accumulated a local beads database that never reached the shared remote, and the divergence was only noticed when the issue counts disagreed (75 vs 8).