PlatformRepositories

Repositories

Full Git protocol support over HTTPS and SSH via native libgit2 Rust bindings. LFS backed by Cloudflare R2.

Repositories are the atomic unit of Drok. Every repository is a first-class citizen of the platform — stored, served, and indexed through a Git implementation that does not shell out to the git binary, does not fork child processes, and does not delegate to anything outside the Rust process boundary.

Native Git Protocol

Drok implements Git protocol support through direct libgit2 Rust bindings. This is not a wrapper around git CLI commands. It is a native Rust integration with the Git object model.

What this means in practice:

  • No subprocess overhead — Every clone, push, fetch, and pull is handled within the Drok server process. No fork(). No exec(). No IPC latency.
  • Memory-safe operations — Rust's ownership model guarantees that repository operations cannot corrupt memory, leak file descriptors, or produce undefined behavior.
  • Concurrent access — Multiple simultaneous push and pull operations are handled safely without lock contention on the repository.

Protocol Support

ProtocolStatusNotes
HTTPSFull supportCertificate-pinned, TLS 1.3 only
SSHFull supportEd25519 and post-quantum key exchange
Git protocol (unauthenticated)Not supportedBy design — unauthenticated access is not a feature

Creating Repositories

Via CLI

drok repo create my-project --private

Options:

drok repo create my-project \
  --private \
  --description "Project description" \
  --default-branch main \
  --license MIT \
  --gitignore Rust \
  --readme

Via Web Interface

Click New Repository from your dashboard or any organization page. The creation form validates the repository name in real time and prevents naming collisions before submission.

Via API

curl -X POST https://drok.us/api/v1/repos \
  -H "Authorization: Bearer $Drok_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "my-project",
    "private": true,
    "description": "Project description",
    "default_branch": "main",
    "license": "MIT",
    "auto_init": true
  }'

Repository Settings

Visibility

  • Private — Visible only to repository members and organization owners.
  • Internal — Visible to all members of the owning organization.
  • Public — Visible to everyone. Cloneable without authentication.

Default Branch

The default branch is configurable per repository. Drok does not impose naming conventions — use main, master, trunk, or whatever your team prefers.

drok repo edit my-project --default-branch main

Transfer and Archive

Repositories can be transferred between users and organizations:

drok repo transfer my-project --to my-org

Archived repositories are read-only. They remain cloneable and browsable but reject all push operations:

drok repo archive my-project
drok repo unarchive my-project

Large File Storage (LFS)

Drok LFS is backed by Cloudflare R2 — S3-compatible object storage with zero egress fees. There is no charge for LFS bandwidth.

Setup

git lfs install
git lfs track "*.psd"
git lfs track "*.zip"
git add .gitattributes
git commit -m "Configure LFS tracking"

LFS objects are stored transparently. Push and pull operations handle LFS pointers and object transfer without additional configuration.

LFS Quotas

PlanStorageBandwidth
Free1 GBUnlimited
Pro50 GBUnlimited
Organization250 GBUnlimited
EnterpriseCustomUnlimited

Bandwidth is always unlimited because Cloudflare R2 does not charge for egress. This is not a promotional offer. It is the architectural advantage of choosing the correct storage provider.

Forking

Fork any public or internal repository:

drok repo fork original-org/project

Forks maintain a link to their upstream repository. The web interface displays fork relationships and provides one-click sync with upstream:

drok repo sync --upstream

Repository Statistics

Every repository dashboard displays:

  • Commit frequency — Daily, weekly, monthly commit graphs
  • Contributor activity — Lines added/removed per contributor over time
  • Language breakdown — Precise byte-count language analysis via Tree-sitter
  • Dependency graph — Visualized dependency tree for supported package ecosystems

Webhooks

Configure repository webhooks to notify external services on events:

drok webhook create my-project \
  --url https://your-service.com/webhook \
  --events push,merge_request,tag \
  --secret your-webhook-secret

Webhook payloads are signed with HMAC-SHA256. The signature is included in the X-Drok-Signature-256 header. See Webhooks for payload formats.

Mirroring

Mirror external repositories into Drok for read-only access or backup:

drok repo mirror https://github.com/rust-lang/rust.git \
  --interval 1h \
  --name rust-mirror

Mirrors sync automatically at the configured interval. Push mirroring (Drok to external) is also supported for organizations maintaining presence on multiple platforms during migration.