beads/internal/storage/versioncontrolops
GGPrompts 75963699e0 fix(embeddeddolt): pass DOLT_REMOTE_USER to push/pull/fetch
Embedded-mode push/pull route through versioncontrolops.{Push,Pull,
ForcePush,Fetch}, which always invoked CALL DOLT_PUSH/PULL/FETCH
without --user. The non-embedded DoltStore path has the
'if s.remoteUser != ""' branch that fires CALL DOLT_PUSH('--user',
?, ?, ?), but the embedded path bypasses it entirely.

Result: against a Dolt remotesapi server that requires CLONE_ADMIN
authentication, bd dolt push/pull from embedded mode fails with
"unauthenticated user does not have privilege CLONE_ADMIN", even when
DOLT_REMOTE_USER and DOLT_REMOTE_PASSWORD are set in the environment.
The shell-level workaround was to bypass bd: cd into the embedded
database dir and run 'dolt push --user beads origin main' directly.

Fix: extend versioncontrolops.{Push,Pull,ForcePush,Fetch} with a
trailing 'user string' (empty preserves prior behavior). When non-empty,
the SQL stored procedures get '--user' appended. EmbeddedDoltStore
reads DOLT_REMOTE_USER from the environment at call time and threads
it through; DOLT_REMOTE_PASSWORD is read by the in-process Dolt
server from the same env, matching the existing contract documented
on bd dolt push/pull.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-25 18:17:43 -04:00
..
backup.go fix: suppress auto-backup address conflict warning (#2927) 2026-04-02 20:28:47 -07:00
backup_test.go fix: suppress auto-backup address conflict warning (#2927) 2026-04-02 20:28:47 -07:00
branches.go /{cmd,internal}: wip sync and data EmbeddedDoltStore methods 2026-03-24 12:01:16 -07:00
clone.go /internal/storage: pr feedback 2026-03-26 11:17:39 -07:00
commit.go /{.github,cmd,internal}: pr feedback, ci fix 2026-03-25 12:58:46 -07:00
compact.go /internal/storage: pr feedback 2026-03-26 11:17:39 -07:00
db.go /{cmd,internal}: wip sync and data EmbeddedDoltStore methods 2026-03-24 12:01:16 -07:00
flatten.go /{cmd,internal}: pr feedback 2026-03-25 15:09:54 -07:00
gc.go /{cmd,internal}: fix commands 2026-03-25 13:48:13 -07:00
ignored_tables.go /internal/storage/schema: use shared schema package 2026-04-06 15:03:20 -07:00
remotes.go fix(embeddeddolt): pass DOLT_REMOTE_USER to push/pull/fetch 2026-04-25 18:17:43 -04:00
version_control.go /{cmd,internal}: pr feedback 2026-03-25 15:09:54 -07:00