Skip to main content
This page documents all environment variables used by wit for configuration.

AI Features

Usage


Usage


Server & Platform

Usage


Repository Storage (REPOS_DIR)

The REPOS_DIR environment variable controls where wit stores git repositories on disk. This is a critical setting for the platform to function correctly.
If REPOS_DIR is not set correctly, you may see “Repository not found on disk” errors when trying to view files, save changes in the IDE, or perform git operations.

How It Works

When you create a repository through the web UI, wit:
  1. Creates a bare git repository at {REPOS_DIR}/{username}/{repo-name}.git
  2. Stores the path /repos/{username}/{repo-name}.git in the database
  3. Resolves this path using REPOS_DIR when accessing the repository

Configuration Examples

Troubleshooting

If you’re getting “Repository not found on disk” errors:
  1. Check where repos are stored:
  2. Set REPOS_DIR to match:
  3. Restart the server:

Migration

If you need to move repositories to a new location:

Git Configuration

wit checks WIT_* variables first, then falls back to GIT_* variables.

Usage


Code Review

Usage


Email Notifications

Email configuration for collaborator invitations.

Usage


GitHub Integration

Usage


SSH Configuration


Development & Debugging

Usage


Rate Limiting


Example Configuration

Development Environment

Production Environment

CI/CD Environment


Loading Environment Variables

Using .env Files

wit supports .env files in your project root:

Using direnv

For project-specific configuration:

Shell Configuration

Add to your shell profile (~/.bashrc, ~/.zshrc):

Security Best Practices

  1. Never commit secrets - Use .env files and add them to .gitignore
  2. Use different keys per environment - Dev, staging, production
  3. Rotate secrets regularly - Especially for production
  4. Use secret managers - AWS Secrets Manager, HashiCorp Vault, etc.