Open fulghum opened 2 years ago
I have some code ready to support this but curious about whether we should extend to remote:
Git can allow something like this
git remote add origin-two https://github.com/user/repo.git
Do we want to also support?
git remote add origin-two https://www.dolthub.com/repositories/jfulghum/test
We could open a separate issue and go from there
This is interesting.
The repository URL on GitHub is actually a fully-fledged HTTP git remote, so it supports clone
and being used as a remote without any special processing.
If we want to support URLs of the dolthub.com format being fully fledged remotes, we can do a little client work and some infra work. In particular:
repositories
prefix when we're handling the path. https://github.com/dolthub/dolt/blob/main/go/libraries/doltcore/remotestorage/chunk_store.go#L119 . Probably something as simple as: if len(tokens) == 3 && tokens[0] == "repositories" { tokens = tokens[1:] }
, with a lingering TODO to eventually fix this.Server-side, we can deploy ingress changes to land https://www.dolt.com/dolt.services.remotesapi.v1alpha1.ChunkStoreService/* on doltremoteapi instead of 404ing.
@reltuk What is that last link? I'm not able to access it.
Very cool @reltuk. I'm assuming we do the same infra change on DoltLab to support using DoltLab URLs, too, right?
Also, just found another related issue with a customer looking for the same behavior: https://github.com/dolthub/dolt/issues/1556
nice catch on that existing issue @fulghum. Sounds like the immediate game plan is to get some client facing work in that maps dolthub.com to doltremoteapi and support clone operations and wait for full remote support until we have a sense of the infrastructure work.
Going to leave this as open until we have some sort of resolution on dolthub remotes.
Git allows users to run
git clone
with GitHub URLs, butdolt clone
doesn't support specifying a url, only the<org name>/<database name>
format.To follow Git's semantics,
dolt clone
should support cloning from DoltHub and DoltLab URLs (e.g.dolt clone https://www.dolthub.com/repositories/jfulghum/test
).