git clone, push, and pull operations over SSH.
Overview
The SSH server provides:- Public key authentication
- Support for git-upload-pack (fetch/clone)
- Support for git-receive-pack (push)
- Integration with wit’s key management system
- Connection statistics and monitoring
Starting the SSH Server
The SSH server runs as part of the wit platform:Configuration
Environment Variables
Generating Host Keys
User SSH Keys
Users authenticate using SSH public keys.Adding a Key
Managing Keys
Key Format
Supported key types:- RSA (ssh-rsa) - 2048+ bits recommended
- Ed25519 (ssh-ed25519) - recommended
- ECDSA (ecdsa-sha2-nistp256/384/521)
Connecting via SSH
Clone a Repository
Push and Pull
SSH Config
Add to~/.ssh/config for convenience:
Access Control
Repository Permissions
Access is controlled by wit’s collaborator system:| Role | Read | Write | Admin |
|---|---|---|---|
| Viewer | Yes | No | No |
| Contributor | Yes | Yes | No |
| Maintainer | Yes | Yes | Partial |
| Admin | Yes | Yes | Yes |
| Owner | Yes | Yes | Yes |
Anonymous Access
By default, anonymous access is disabled. To enable read-only anonymous access:Monitoring
Server Statistics
Connection Events
The SSH server emits events that can be monitored:Security
Key Fingerprints
Keys are identified by SHA-256 fingerprints:Key Deactivation
Deactivate a key without deleting it:Session Limits
Configure connection limits:Docker Deployment
Docker Compose
Generating Keys in Docker
Programmatic Usage
Creating an SSH Server
Managing Keys Programmatically
Troubleshooting
Connection Refused
Authentication Failed
Permission Denied
Comparison with HTTP
| Feature | SSH | HTTP |
|---|---|---|
| Authentication | Public key | Token/Password |
| Setup complexity | Medium | Low |
| Firewall-friendly | No | Yes |
| Performance | Slightly faster | Good |
| 2FA support | Via key management | Built-in |
Related
- wit serve - HTTP server
- wit tokens - Personal access tokens
- wit collaborator - Access control