### Command Overview

```bash
GITSYNC_MAX_REF_UPDATES_PER_PUSH=5000 go run ./cmd/git-sync replicate --all-refs --stats --verbose
```

- **Repository URL:** [https://github.com/entireio/large-ref-test.git](https://github.com/entireio/large-ref-test.git)
- **Target URL:** `entire://aws-us-east-2.entire.io/et/soph-test/soph-test-large-ref`

#### Error Message

```
error: replicate: replicate: list target refs: request info refs: request info-refs: Get "entire://aws-us-east-2.entire.io/et/soph-test/soph-test-large-ref/info/refs?service=git-receive-pack": round trip: unsupported protocol scheme "entire"
exit status 1
```

### Understanding `entire://` Scheme

The `entire://` scheme is not recognized by `git-sync`. It primarily supports:
- `https://`
- `http://`
- `ssh://`
- `git+ssh://`
- `file://`

If you attempt to use `entire://`, it gets passed to Go's HTTP transport, which results in the unsupported protocol error.

### Authentication Details

Authentication works by leveraging the Entire DB credential lookup based on the host. It reads from `~/.config/entire/hosts.json` and utilizes the keyring for an active user. If you have previously logged in using the Entire CLI for that host, it should authenticate automatically. If you haven't, you need to log in first or provide the token using `--target-token` or `--target-bearer-token`.

### Integration with `git-sync`

- You can replicate with the `https://` URL instead of `entire://`, as shown below:

```bash
GITSYNC_MAX_REF_UPDATES_PER_PUSH=5000 go run ./cmd/git-sync replicate --all-refs --stats --verbose \
    https://github.com/entireio/large-ref-test.git \
    https://aws-us-east-2.entire.io/et/soph-test/soph-test-large-ref
```

This allows for proper authentication using the built-in Entire DB token lookup, making it easier to manage your credentials within Git.

### Conclusion

The `entire://` URL scheme facilitates certain CLI commands but is not supported by `git-sync`. Always opt for HTTPS URLs to ensure compatibility and a seamless experience with authentication.
