Git Server Documentation
Complete guide to using 404's git hosting service
📑 Table of Contents
🌳 Git Repository Server
404 provides a full-featured git hosting service with SSH and HTTPS access, interactive TUI, and anonymous repository hosting.📡 Connection Details
| Service | Address | Port |
|---|---|---|
| SSH (Git) | git@git.4-0-4.io | 22 |
| SSH (Shell) | ssh://git.4-0-4.io | 22 |
| HTTPS | https://gitx.4-0-4.io | 443 |
🚀 Quick Start
Browse Repositories (TUI)
Launch the interactive Terminal User Interface to explore available repositories:ssh git.4-0-4.ioNo authentication required to browse public repositories!
Clone a Repository
Via SSH:git clone git@git.4-0-4.io:repository-name.gitVia HTTPS:
git clone https://gitx.4-0-4.io/repository-name.git🔧 Repository Management
Create a New Repository
- Connect to the TUI via SSH
- Select "Create Repository" from the menu
- Choose a name and visibility settings
- Follow the on-screen instructions
Push to Your Repository
# Add remote
git remote add origin git@git.4-0-4.io:your-repo.git
# Push your code
git push -u origin mainRepository Settings
- Public Repositories: Visible to everyone, no authentication needed to clone
- Private Repositories: Require authentication to access
- Collaboration: Add collaborators via the TUI
🔑 Authentication
SSH Keys
Add your SSH public key through the TUI:- Connect via SSH
- Navigate to "Settings" → "SSH Keys"
- Paste your public key (usually
~/.ssh/id_rsa.pub)
Generate a new SSH key if needed:
ssh-keygen -t ed25519 -C "your_email@example.com"HTTPS Authentication
For HTTPS access, use personal access tokens:- Generate a token in the TUI under "Settings" → "Tokens"
- When prompted for a password during git operations, use your token
🌐 Advanced Features
Git Hooks
Support for server-side hooks:pre-receive- Validate commits before acceptingpost-receive- Trigger CI/CD on pushupdate- Per-branch validation
Repository Mirroring
Mirror repositories from other git servers:git clone --mirror https://github.com/user/repo.git
git push --mirror git@git.4-0-4.io:repo.gitLarge File Support
Git LFS is supported for large binary files:git lfs install
git lfs track "*.psd"
git add .gitattributes🔒 Security Features
- SSH Authentication: Secure key-based authentication
- TLS/SSL: All HTTPS traffic is encrypted
- Rate Limiting: Protection against abuse
- Access Control: Fine-grained repository permissions
- Tor Access: Full support for Tor connections
💡 Tips and Best Practices
- Use SSH over HTTPS for better performance and security
- Add .gitignore to exclude sensitive files
- Write meaningful commit messages for better collaboration
- Use branches for feature development
- Tag releases for version management
🐛 Troubleshooting
Permission Denied (publickey)
# Check your SSH agent
ssh-add -l
# Add your key if needed
ssh-add ~/.ssh/id_ed25519Authentication Failed
- Verify your SSH key is added to your account
- Check that the remote URL is correct
- Ensure your token is valid (for HTTPS)
Connection Timeout
- Check your firewall settings
- Try using HTTPS instead of SSH
- Consider using Tor if your ISP blocks connections
📚 Additional Resources
For support, join #git on our IRC server or consult the community forums.