Add API.md (3200+ lines) with complete REST API documentation covering authentication, repository management, issues, pull requests, organizations, package registry, Actions, and Vault APIs. Includes code examples and error handling. Add GUIDE.md with user-focused documentation for getting started, repository operations, collaboration workflows, and CI/CD setup. Implement documentation tab in repository view with automatic detection and rendering of API.md and GUIDE.md files alongside README. Add locale strings and template for doc tab navigation.
36 KiB
GitCaddy Users Guide
A comprehensive guide to using GitCaddy, a self-hosted Git repository management platform with AI capabilities, encrypted secrets management, and enterprise features.
Table of Contents
- Introduction
- Getting Started
- Basic Repository Operations
- Collaboration Workflows
- Wiki Documentation
- CI/CD with GitCaddy Actions
- Vault: Encrypted Secrets Management
- Package Registry
- AI-Powered Features
- Organizations and Teams
- Landing Pages and Custom Domains
- Authentication and Security
- Customization and Settings
- Tips and Best Practices
- Troubleshooting
Introduction
GitCaddy is a powerful, self-hosted Git repository management platform that provides a complete solution for version control, issue tracking, CI/CD workflows, package registry, and team collaboration. Built as an enhanced fork of Gitea, GitCaddy adds enterprise features including:
- AI-powered code review and issue triage
- Vault encrypted secrets management with audit logging
- Package registry supporting npm, Maven, Docker, PyPI, Go, Cargo, NuGet, and more
- Custom landing pages with SSL/TLS support
- Comprehensive internationalization with 18+ supported languages
- GitCaddy Actions for CI/CD automation
- Advanced collaboration tools including project boards, wikis, and time tracking
This guide will walk you through everything you need to know to effectively use GitCaddy, from initial setup to advanced workflows.
Getting Started
Prerequisites
Before installing GitCaddy, ensure you have the following:
- Go runtime (version 1.18 or higher)
- Node.js and npm (for building frontend assets)
- Git (version 2.0 or higher)
- Database: PostgreSQL, MySQL, SQLite, or MSSQL
- Operating System: Linux, macOS, or Windows
Installation
Follow these steps to install GitCaddy on your server:
1. Clone the Repository
git clone https://github.com/your-org/gitcaddy.git
cd gitcaddy
2. Build the Backend
# Install Go dependencies
go mod download
# Build the GitCaddy binary
go build -o gitcaddy
3. Build the Frontend
# Install Node.js dependencies
npm install
# Build frontend assets
npm run build
4. Configure the Database
Create a configuration file custom/conf/app.ini with your database settings:
[database]
DB_TYPE = postgres
HOST = localhost:5432
NAME = gitcaddy
USER = gitcaddy_user
PASSWD = your_secure_password
Supported database types: postgres, mysql, sqlite3, mssql
5. Start GitCaddy
./gitcaddy web
By default, GitCaddy runs on port 3000. Access it at http://localhost:3000
First-Time Setup
When you first access GitCaddy, you'll be guided through a web-based installation wizard:
- Database Configuration: Verify or adjust database connection settings
- General Settings: Configure site title, domain, and SSH/HTTP ports
- Administrator Account: Create your admin user account
- Optional Settings: Configure email, server paths, and additional features
- Install: Click "Install GitCaddy" to complete setup
After installation, you'll be redirected to your dashboard where you can start creating repositories and inviting users.
Basic Repository Operations
Creating a Repository
To create a new repository:
-
Click the "+" icon in the top navigation bar
-
Select "New Repository"
-
Fill in the repository details:
- Owner: Select your user or an organization
- Repository Name: Choose a unique name
- Description: Optional description of your project
- Visibility: Public or Private
- Initialize Repository: Optionally add README, .gitignore, and license
- Template: Search for and select a repository template
-
Click "Create Repository"
Example: Creating a Node.js project repository
Owner: myusername
Repository Name: my-nodejs-app
Description: A sample Node.js application
Visibility: Private
✓ Initialize with README
.gitignore: Node
License: MIT License
Cloning and Pushing Code
After creating a repository, clone it to your local machine:
# Clone via HTTPS
git clone https://gitcaddy.example.com/username/my-nodejs-app.git
# Or clone via SSH
git clone git@gitcaddy.example.com:username/my-nodejs-app.git
Add files and push your first commit:
cd my-nodejs-app
echo "# My Node.js App" > README.md
git add README.md
git commit -m "Initial commit"
git push origin main
Managing Branches and Tags
Creating a Branch
# Create and switch to a new branch
git checkout -b feature/new-feature
# Push the branch to GitCaddy
git push origin feature/new-feature
In the GitCaddy web interface:
- Navigate to your repository
- Click the branch dropdown (usually shows "main")
- Type a new branch name and click "Create branch"
Branch Protection Rules
Protect important branches from direct pushes:
- Go to Settings → Branches
- Click "Add Rule"
- Configure protection settings:
- Require pull request reviews
- Require status checks to pass
- Restrict who can push
- Enable force push protection
Creating Tags
# Create an annotated tag
git tag -a v1.0.0 -m "Release version 1.0.0"
# Push tags to GitCaddy
git push origin --tags
File Operations
GitCaddy provides a web-based file editor for quick changes:
- Navigate to a file in your repository
- Click the pencil icon to edit
- Make your changes in the markdown-aware editor
- Add a commit message
- Choose to commit directly or create a new branch
- Click "Commit Changes"
Uploading Files:
- Navigate to the target directory
- Click "Upload file"
- Drag and drop files or click to browse
- Add a commit message and commit
Deleting Files:
- Navigate to the file
- Click the trash icon
- Confirm deletion with a commit message
Collaboration Workflows
Working with Issues
Issues are the foundation of project tracking in GitCaddy. They support rich features including labels, milestones, assignments, time tracking, and dependencies.
Creating an Issue
-
Navigate to your repository
-
Click the "Issues" tab
-
Click "New Issue"
-
Fill in the details:
- Title: Brief description of the issue
- Description: Detailed explanation using markdown
- Labels: Categorize the issue (bug, enhancement, question, etc.)
- Milestone: Associate with a project milestone
- Assignees: Assign team members
- Projects: Add to a project board
-
Click "Create Issue"
Example Issue:
Title: Add user authentication to API
Description:
## Problem
The API currently lacks authentication, allowing unauthorized access.
## Proposed Solution
Implement JWT-based authentication with the following endpoints:
- POST /api/auth/login
- POST /api/auth/register
- POST /api/auth/refresh
## Acceptance Criteria
- [ ] JWT tokens are generated on successful login
- [ ] Protected endpoints validate tokens
- [ ] Refresh token mechanism is implemented
- [ ] Unit tests cover all auth flows
Labels: enhancement, security
Milestone: v2.0.0
Assignees: @developer1, @developer2
Time Tracking
Track time spent on issues:
- Open an issue
- In the sidebar, find "Time Tracking"
- Click "Add Time" and enter hours/minutes
- View total time spent and estimates
Issue Dependencies
Create dependencies between issues:
- Open an issue
- In the description or comments, reference another issue:
Depends on #123 - GitCaddy automatically creates a dependency link
- The dependent issue cannot be closed until dependencies are resolved
Pull Request Workflow
Pull requests (PRs) enable code review and collaborative development.
Creating a Pull Request
-
Push your feature branch to GitCaddy
-
Navigate to the repository
-
Click "New Pull Request"
-
Select the base branch (e.g.,
main) and compare branch (e.g.,feature/new-feature) -
Review the diff visualization
-
Fill in PR details:
- Title: Descriptive title
- Description: Explain changes, link related issues
- Reviewers: Request reviews from team members
- Labels, Milestone, Assignees: Same as issues
-
Click "Create Pull Request"
Example PR Description:
## Changes
This PR implements user authentication for the API as described in #45.
## Implementation Details
- Added JWT middleware for token validation
- Created auth controller with login/register/refresh endpoints
- Implemented password hashing with bcrypt
- Added comprehensive unit tests (95% coverage)
## Testing
- All existing tests pass
- New tests cover authentication flows
- Manual testing completed on staging environment
Closes #45
Reviewing Pull Requests
As a reviewer:
-
Open the pull request
-
Navigate to the "Files changed" tab
-
Review the diff:
- Click on a line number to add inline comments
- Suggest specific code changes
- Mark files as reviewed
-
Submit your review:
- Comment: General feedback without approval
- Approve: Approve the changes
- Request Changes: Block merging until issues are addressed
Merging Pull Requests
Once approved and status checks pass:
-
Click the "Merge Pull Request" button
-
Choose a merge strategy:
- Create a merge commit: Preserves all commits with a merge commit
- Squash and merge: Combines all commits into one
- Rebase and merge: Replays commits on top of base branch
-
Confirm the merge
-
Optionally delete the feature branch
Code Reviews
GitCaddy supports comprehensive code review features:
- Inline comments: Comment on specific lines of code
- Suggestion blocks: Propose code changes that can be committed directly
- Review threads: Discussions can be marked as resolved
- Status checks: Automated checks must pass before merging
- Required approvals: Enforce minimum number of approvals
Making a code suggestion:
```suggestion
function calculateTotal(items) {
return items.reduce((sum, item) => sum + item.price, 0);
}
### Project Boards
Organize work using Kanban-style project boards:
1. Navigate to your repository
2. Click the **"Projects"** tab
3. Click **"New Project"**
4. Choose a template or start blank
5. Create columns (e.g., "To Do", "In Progress", "Done")
6. Add issues and pull requests to columns
7. Drag and drop cards between columns
**Best Practice**: Use automation rules to move cards automatically based on issue/PR status.
---
## Wiki Documentation
Every repository includes a wiki for documentation.
### Creating Wiki Pages
1. Navigate to the **"Wiki"** tab in your repository
2. Click **"New Page"**
3. Enter a page title
4. Write content using the EasyMDE markdown editor with live preview
5. Click **"Save Page"**
### Wiki Features
- **Markdown support**: Full markdown syntax including tables, code blocks, and images
- **Mermaid diagrams**: Embed flowcharts, sequence diagrams, and more
- **Math formulas**: Use KaTeX for mathematical notation
- **Page hierarchy**: Organize pages with forward slashes (e.g., `Getting Started/Installation`)
- **History**: View page revisions and revert changes
- **Search**: Full-text search across all wiki pages
**Example Wiki Page:**
```markdown
# API Documentation
## Authentication
All API requests require a JWT token in the Authorization header:
```http
GET /api/users
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
Endpoints
GET /api/users
Returns a list of users.
Response:
{
"users": [
{"id": 1, "username": "alice"},
{"id": 2, "username": "bob"}
]
}
Rate Limiting
API requests are limited to 100 requests per hour per user.
---
## CI/CD with GitCaddy Actions
GitCaddy Actions provides integrated CI/CD automation similar to GitHub Actions.
### Creating Workflows
Workflows are defined in YAML files stored in `.gitea/workflows/` directory.
#### Example: Node.js Test Workflow
Create `.gitea/workflows/test.yml`:
```yaml
name: Node.js Tests
on:
push:
branches: [main, develop]
pull_request:
branches: [main]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14, 16, 18]
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies
run: npm ci
- name: Run tests
run: npm test
- name: Upload coverage
uses: actions/upload-artifact@v3
with:
name: coverage-report
path: coverage/
Commit and push this file to trigger the workflow.
Managing Runners
Runners execute your workflow jobs. GitCaddy supports self-hosted runners.
Registering a Runner
- Navigate to Settings → Actions → Runners
- Click "Add Runner"
- Follow the instructions to download and configure the runner on your machine:
# Download runner
wget https://gitcaddy.example.com/actions/runner/download
# Extract and configure
./config.sh --url https://gitcaddy.example.com --token YOUR_RUNNER_TOKEN
# Start the runner
./run.sh
Monitoring Runners
- View runner status (online/offline) in the Runners page
- Check runner tasks and job history
- Run bandwidth tests to verify connectivity
Secrets and Variables
Store sensitive data like API keys and passwords securely.
Adding Secrets
- Navigate to Settings → Secrets and Variables → Actions
- Click "New repository secret"
- Enter a name (e.g.,
API_KEY) and value - Click "Add secret"
Using Secrets in Workflows
steps:
- name: Deploy to production
run: ./deploy.sh
env:
API_KEY: ${{ secrets.API_KEY }}
DATABASE_URL: ${{ secrets.DATABASE_URL }}
Security Note: Secrets are encrypted and never exposed in logs.
Vault: Encrypted Secrets Management
Vault is an enterprise feature providing advanced encrypted secrets management with version history and audit logging.
Creating Secrets
-
Navigate to Settings → Vault
-
Click "New Secret"
-
Enter secret details:
- Key: Secret identifier (e.g.,
production-db-password) - Value: Secret content (automatically encrypted)
- Description: Optional description
- Key: Secret identifier (e.g.,
-
Click "Create Secret"
Using Secrets in CI/CD
Vault secrets can be accessed in workflows using access tokens.
Generate an Access Token
-
In Vault settings, click "Access Tokens"
-
Click "Generate Token"
-
Configure token permissions:
- Scope: Select specific secrets or all secrets
- Expiration: Set token lifetime
- Permissions: Read-only or read-write
-
Copy the generated token (shown only once)
Use Token in Workflow
steps:
- name: Fetch database credentials
run: |
curl -H "Authorization: Bearer ${{ secrets.VAULT_TOKEN }}" \
https://gitcaddy.example.com/api/vault/secrets/production-db-password
Audit Logs and Version History
Vault maintains comprehensive audit logs:
-
Navigate to Vault → Audit Logs
-
View all operations:
- Secret creation, updates, deletions
- Access token generation and usage
- User who performed each action
- Timestamp of each operation
-
Version History: Click on a secret to view all previous versions
-
Rollback: Restore a previous version if needed
Vault Licensing Tiers:
- Solo: Basic secrets management
- Pro: Advanced access controls
- Team: Multi-user collaboration features
- Enterprise: Full audit logging and compliance features
Package Registry
GitCaddy includes a multi-format package registry supporting popular ecosystems.
Publishing Packages
npm Packages
Configure npm to use GitCaddy registry:
# Set registry URL
npm config set registry https://gitcaddy.example.com/api/packages/username/npm/
# Authenticate
npm login --registry=https://gitcaddy.example.com/api/packages/username/npm/
# Publish package
npm publish
Docker Images
# Login to registry
docker login gitcaddy.example.com
# Tag image
docker tag myimage:latest gitcaddy.example.com/username/myimage:latest
# Push image
docker push gitcaddy.example.com/username/myimage:latest
Maven Packages
Add to your pom.xml:
<distributionManagement>
<repository>
<id>gitcaddy</id>
<url>https://gitcaddy.example.com/api/packages/username/maven</url>
</repository>
</distributionManagement>
Deploy with Maven:
mvn deploy
Python Packages (PyPI)
Configure .pypirc:
[distutils]
index-servers = gitcaddy
[gitcaddy]
repository = https://gitcaddy.example.com/api/packages/username/pypi
username = your-username
password = your-token
Upload package:
python setup.py sdist bdist_wheel
twine upload --repository gitcaddy dist/*
Installing Packages
GitCaddy provides installation instructions for each package in the web interface:
- Navigate to Packages in your repository or user profile
- Click on a package
- View ecosystem-specific installation commands
Example for npm:
npm install --registry=https://gitcaddy.example.com/api/packages/username/npm/ package-name
AI-Powered Features
GitCaddy integrates AI capabilities to enhance code quality and productivity.
AI Code Review
Enable AI-assisted code reviews to receive automated feedback on pull requests.
Enabling AI Code Review
- Navigate to Repository Settings → AI Features
- Enable "AI Code Review"
- Configure review preferences:
- Review depth: Quick scan or comprehensive analysis
- Focus areas: Security, performance, best practices
- Auto-comment: Automatically post suggestions as PR comments
How It Works
When a pull request is created:
-
AI analyzes the code changes
-
Identifies potential issues:
- Security vulnerabilities
- Performance bottlenecks
- Code smells and anti-patterns
- Style inconsistencies
-
Posts suggestions as PR comments
-
Provides explanations and recommended fixes
Example AI Comment:
🤖 AI Code Review
Potential Security Issue: SQL query is vulnerable to injection attacks.
Location:
src/database.js:45Recommendation: Use parameterized queries instead of string concatenation.
// Instead of: const query = `SELECT * FROM users WHERE id = ${userId}`; // Use: const query = 'SELECT * FROM users WHERE id = ?'; db.query(query, [userId]);
AI Issue Triage
AI automatically categorizes and prioritizes new issues.
Enabling AI Issue Triage
- Navigate to Repository Settings → AI Features
- Enable "AI Issue Triage"
- Configure triage rules:
- Auto-label: Automatically apply labels based on content
- Priority assignment: Suggest priority levels
- Similar issues: Link to related issues
How It Works
When an issue is created:
- AI analyzes the issue title and description
- Suggests appropriate labels (bug, enhancement, documentation, etc.)
- Identifies priority based on keywords and context
- Finds similar existing issues to prevent duplicates
Code Explanation
Get AI-generated explanations for complex code.
Using Code Explanation
- Navigate to a file in your repository
- Select a code block
- Click the "Explain with AI" button
- View the explanation in plain language
Example:
const memoize = (fn) => {
const cache = new Map();
return (...args) => {
const key = JSON.stringify(args);
if (cache.has(key)) return cache.get(key);
const result = fn(...args);
cache.set(key, result);
return result;
};
};
AI Explanation:
This code implements a memoization function, which is a performance optimization technique. It creates a cache to store the results of expensive function calls. When the function is called with the same arguments again, it returns the cached result instead of recalculating it. This is useful for pure functions with expensive computations.
Organizations and Teams
Organizations enable collaborative management of multiple repositories with team-based permissions.
Creating Organizations
-
Click the "+" icon in the top navigation
-
Select "New Organization"
-
Fill in organization details:
- Organization Name: Unique identifier
- Display Name: Full name
- Description: Organization purpose
- Website: Optional URL
- Location: Optional location
-
Click "Create Organization"
Managing Teams
Teams group users within an organization and control access to repositories.
Creating a Team
-
Navigate to your organization
-
Click the "Teams" tab
-
Click "New Team"
-
Configure team settings:
- Team Name: Descriptive name
- Description: Team purpose
- Visibility: Visible or hidden
-
Click "Create Team"
Adding Team Members
- Open the team
- Click "Add Member"
- Search for users and click "Add"
- Assign roles:
- Member: Standard access
- Admin: Can manage team settings
Team Permissions
Control repository access per team:
- Navigate to Teams → Select a team
- Click "Repositories"
- Click "Add Repository"
- Select repository and set permissions:
- Read: View code and issues
- Write: Push commits, create issues/PRs
- Admin: Full repository management
Best Practice: Use teams to implement the principle of least privilege. Grant only the permissions necessary for each team's responsibilities.
Landing Pages and Custom Domains
Create professional landing pages for your repositories with custom domains.
Enabling Landing Pages
-
Navigate to Repository Settings → Pages
-
Enable "Landing Pages"
-
Configure page settings:
- Source: Select branch and directory (e.g.,
main/docs) - Custom Domain: Enter your domain (e.g.,
docs.myproject.com) - SSL/TLS: Enable HTTPS with automatic certificate
- Source: Select branch and directory (e.g.,
-
Customize your landing page:
- Hero Section: Add title, subtitle, and call-to-action
- Features: Highlight key features with icons
- Pricing: Display pricing tiers
- Branding: Upload logo and customize colors
-
Click "Save Settings"
Configuring Custom Domains
-
In your DNS provider, add a CNAME record:
docs.myproject.com CNAME gitcaddy.example.com -
In GitCaddy Pages settings, enter the custom domain
-
Click "Verify Domain"
-
Enable "Enforce HTTPS" for automatic SSL certificate
Your landing page will be accessible at https://docs.myproject.com
SEO Optimization
Optimize landing pages for search engines:
- Navigate to Pages → SEO Settings
- Configure meta tags:
- Title: Page title for search results
- Description: Meta description
- Keywords: Relevant keywords
- Open Graph: Social media preview settings
Authentication and Security
GitCaddy provides multiple authentication methods and security features.
Two-Factor Authentication
Enhance account security with 2FA.
Enabling 2FA
- Navigate to Settings → Security
- Click "Enable Two-Factor Authentication"
- Scan the QR code with an authenticator app (Google Authenticator, Authy, etc.)
- Enter the verification code
- Save recovery codes in a secure location
- Click "Enable 2FA"
WebAuthn (Hardware Keys)
Use hardware security keys for passwordless authentication:
- Navigate to Settings → Security → WebAuthn
- Click "Add Security Key"
- Enter a nickname for the key
- Follow browser prompts to register your key
- Test the key by logging out and back in
SSH and GPG Keys
Adding SSH Keys
-
Generate an SSH key pair on your machine:
ssh-keygen -t ed25519 -C "your_email@example.com" -
Navigate to Settings → SSH / GPG Keys
-
Click "Add Key"
-
Paste your public key (
~/.ssh/id_ed25519.pub) -
Give it a descriptive name
-
Click "Add Key"
Test your SSH connection:
ssh -T git@gitcaddy.example.com
Signing Commits with GPG
-
Generate a GPG key:
gpg --full-generate-key -
Export your public key:
gpg --armor --export your_email@example.com -
Navigate to Settings → SSH / GPG Keys → GPG Keys
-
Click "Add Key" and paste your public key
-
Configure Git to sign commits:
git config --global user.signingkey YOUR_KEY_ID git config --global commit.gpgsign true
Signed commits display a "Verified" badge in GitCaddy.
OAuth2 and SSO
Configure external authentication providers for single sign-on.
Supported Providers
- GitHub
- GitLab
- Microsoft Azure AD
- LDAP/Active Directory
- SAML 2.0
- OpenID Connect
Configuring OAuth2 (Admin)
-
Navigate to Site Administration → Authentication Sources
-
Click "Add Authentication Source"
-
Select provider type (e.g., OAuth2)
-
Configure provider settings:
- Client ID: From provider
- Client Secret: From provider
- Authorization URL: Provider-specific
- Token URL: Provider-specific
- User Info URL: Provider-specific
-
Click "Add Authentication Source"
Users can now log in using the external provider.
Customization and Settings
User Preferences
Personalize your GitCaddy experience:
-
Navigate to Settings → Profile
-
Configure preferences:
- Display Name: Your full name
- Email: Primary email address
- Website: Personal or company website
- Location: Your location
- Biography: Brief description
-
Appearance Settings:
- Language: Select from 18+ supported languages (English, German, Hindi, Italian, Polish, Portuguese, etc.)
- Theme: Light, dark, or auto (system preference)
-
Notification Settings:
- Email Notifications: Configure which events trigger emails
- Web Notifications: Enable browser notifications
- Watching: Auto-watch repositories you create or contribute to
Repository Settings
Configure individual repository settings:
-
Navigate to your repository → Settings
-
General:
- Repository name, description, website
- Visibility (public/private)
- Template repository
- Archive repository
-
Features:
- Enable/disable issues, wiki, projects, actions
- External wiki URL
- External issue tracker
-
Collaborators:
- Add users with specific permissions
- Manage access levels
-
Branches:
- Default branch
- Branch protection rules
- Required status checks
-
Webhooks:
- Configure webhooks for external integrations
Webhooks and Integrations
Integrate GitCaddy with external services.
Creating a Webhook
-
Navigate to Repository Settings → Webhooks
-
Click "Add Webhook"
-
Configure webhook:
- Payload URL: Endpoint to receive events
- Content Type: JSON or form-encoded
- Secret: Optional secret for verification
- Events: Select which events trigger the webhook
- Push events
- Pull request events
- Issue events
- Release events
- etc.
-
Click "Add Webhook"
Supported Integrations
GitCaddy provides pre-configured integrations for:
- Slack: Post notifications to Slack channels
- Discord: Send updates to Discord servers
- Microsoft Teams: Integrate with Teams channels
- Matrix: Connect to Matrix chat rooms
- Telegram: Send notifications to Telegram
- Email: Custom email notifications
Example: Slack Integration
- Create an incoming webhook in Slack
- In GitCaddy, add a Slack webhook
- Paste the Slack webhook URL
- Select events to post (push, PR, issues)
- Customize message format and channel
Tips and Best Practices
Repository Management
- Use Templates: Create repository templates for common project structures to save time
- Branch Protection: Always enable branch protection on
mainandproductionbranches - Required Reviews: Enforce at least one code review before merging pull requests
- Status Checks: Set up CI/CD workflows as required status checks
- CODEOWNERS File: Create a
CODEOWNERSfile to automatically request reviews from relevant team members
Issue Tracking
- Labels: Establish a consistent labeling system across repositories
- Templates: Create issue templates for bug reports, feature requests, and questions
- Milestones: Use milestones to track progress toward releases
- Project Boards: Visualize work with project boards for sprint planning
- Time Tracking: Estimate and track time for better project planning
Pull Requests
- Small PRs: Keep pull requests focused and small for easier review
- Descriptive Titles: Write clear, descriptive PR titles
- Link Issues: Always reference related issues in PR descriptions
- Draft PRs: Use draft pull requests for work-in-progress code
- Review Checklist: Create a PR template with a review checklist
CI/CD Workflows
- Matrix Testing: Test across multiple versions and platforms
- Caching: Cache dependencies to speed up workflow runs
- Artifacts: Upload build artifacts and test results
- Conditional Jobs: Use conditions to skip unnecessary jobs
- Secrets Management: Use Vault for sensitive credentials
Security
- 2FA: Require two-factor authentication for all organization members
- Signed Commits: Enforce GPG-signed commits for critical repositories
- Dependency Scanning: Set up automated dependency vulnerability scanning
- Secret Scanning: Enable secret scanning to prevent credential leaks
- Regular Audits: Review access permissions and audit logs regularly
Performance
- LFS for Large Files: Use Git LFS for binary files and large assets
- Shallow Clones: Use shallow clones in CI/CD to reduce clone time
- Archive Inactive Repos: Archive repositories that are no longer maintained
- Cleanup: Regularly clean up old branches and tags
Troubleshooting
Authentication Issues
Problem: Cannot push or pull from repository
Solutions:
- Verify SSH key is added to your GitCaddy account
- Test SSH connection:
ssh -T git@gitcaddy.example.com - For HTTPS, ensure you're using a personal access token, not your password
- Check repository permissions (you may only have read access)
Problem: 2FA code not working
Solutions:
- Ensure your device clock is synchronized (2FA is time-based)
- Try using a recovery code instead
- Contact an administrator to reset 2FA if locked out
Workflow Issues
Problem: GitCaddy Actions workflow not triggering
Solutions:
- Verify the workflow file is in
.gitea/workflows/directory - Check YAML syntax (use a YAML validator)
- Ensure the trigger events match your actions (e.g.,
on: push) - Check if Actions are enabled in repository settings
- Verify at least one runner is online and available
Problem: Workflow fails with "runner not found"
Solutions:
- Check runner status in Settings → Actions → Runners
- Restart the runner service
- Verify runner labels match workflow requirements
- Check runner logs for connection issues
Repository Issues
Problem: Large repository clone is slow
Solutions:
- Use shallow clone:
git clone --depth=1 <url> - Enable Git LFS for large files
- Consider using sparse checkout for monorepos
- Check network connectivity and bandwidth
Problem: Cannot merge pull request
Solutions:
- Resolve merge conflicts locally and push
- Ensure all required status checks pass
- Verify you have required approvals
- Check branch protection rules
- Ensure you have write permissions
Vault Issues
Problem: Cannot access Vault secrets in workflow
Solutions:
- Verify access token has correct permissions
- Check token hasn't expired
- Ensure secret key name matches exactly (case-sensitive)
- Verify Vault is enabled for the repository/organization
Package Registry Issues
Problem: Cannot publish package
Solutions:
- Verify authentication credentials
- Check package name doesn't conflict with existing package
- Ensure you have write permissions to the registry
- Review package manifest for errors
- Check registry URL is correct for the package type
Problem: Cannot install package
Solutions:
- Verify registry URL is configured correctly
- Check authentication if package is private
- Ensure package version exists
- Try clearing package manager cache
Performance Issues
Problem: GitCaddy web interface is slow
Solutions:
- Check server resources (CPU, memory, disk)
- Review database performance and optimize queries
- Enable caching in
app.iniconfiguration - Check for large repositories causing indexing delays
- Review logs for errors:
./gitcaddy admin logs
Problem: Git operations are slow
Solutions:
- Run
git gcto optimize repository - Check if repository needs LFS for large files
- Verify network latency between client and server
- Consider using SSH instead of HTTPS (or vice versa)
Getting Help
If you continue to experience issues:
- Documentation: Check the official GitCaddy documentation
- Community Forum: Search or post in the community forum
- Issue Tracker: Report bugs in the GitCaddy repository
- Admin Logs: Review system logs in Site Administration → Monitoring
- Support: Contact your GitCaddy administrator or support team
Useful Commands:
# Check GitCaddy version
./gitcaddy --version
# View logs
./gitcaddy admin logs
# Run diagnostics
./gitcaddy doctor
# Database maintenance
./gitcaddy admin regenerate hooks
./gitcaddy admin regenerate keys
Conclusion
GitCaddy provides a comprehensive, self-hosted solution for Git repository management with powerful features for collaboration, automation, and security. This guide has covered the essential workflows and features to help you get started and become productive quickly.
For advanced topics, enterprise features, and administrative configuration, refer to the official GitCaddy documentation or contact your system administrator.
Happy coding! 🚀