dolt icon indicating copy to clipboard operation
dolt copied to clipboard

`The current directory is not a valid dolt repository` error message after two users, one authenticated and one not, tried to access the same cloned repository

Open stephkyou opened this issue 1 year ago • 2 comments

Original error message was seen after two users, one authenticated and one not, tried to access the same cloned repository.

[doltUser]$ dolt clone dolthubDB
cloning https://doltremoteapi.dolthub.com/dolthubDB
[doltUser]$ cd dolthubDB/
[doltUser]$ dolt status
The current directory is not a valid dolt repository.
[root]$ dolt sql -q "select 1 from branchMetadata"
ERRO[0002] invalid replication configuration, replication disabled: failed to load replica database from remote 'origin'; could not access dolt url 'https://doltremoteapi.dolthub.com/dolthubDB': rpc error: code = PermissionDenied desc = permission denied
+---+
| 1 |
+---+
| 1 |
+---+

Attempted repro steps taken:

$ dolt login
$ dolt clone dolthubDB
$ cd dolthubDB
$ dolt sql -q "set @@persist.dolt_read_replica_remote = 'origin'"
$ dolt sql -q "set @@persist.dolt_replicate_heads = main"

$ dolt creds rm <key>
$ dolt sql -q "select 1 from dolt_branches"
ERRO[0000] invalid replication configuration, replication disabled: failed to load replica database from remote 'origin'; invalid creds file

$ dolt login
$ dolt status
everything normal, no errors

In other words, able to reproduce all steps from the original issue except the last error message of The current directory is not a valid dolt repository.

stephkyou avatar Sep 14 '23 22:09 stephkyou

same phenomenon.

Mickychen00 avatar Dec 14 '23 15:12 Mickychen00

Thanks. @stephkyou will keep digging here.

timsehn avatar Dec 14 '23 16:12 timsehn