Skip to content

Gitea: Self-Hosted Git Service

Gitea is a lightweight, self-hosted Git service. It provides a web interface for managing your Git repositories, similar to GitHub or GitLab, but running on your own server. This gives you full control over your code, documents, and version history.

Key Features

  • Repository Management: Create, manage, and browse Git repositories.
  • Version Control: Track changes to code, documentation, and other files.
  • Collaboration: Supports pull requests, issues, and wikis for team collaboration.
  • User Management: Manage users and organizations with permission controls.
  • Lightweight: Designed to be efficient and run on modest hardware.
  • Self-Hosted: Full control over your data and infrastructure.
  • Web Interface: User-friendly interface for common Git operations.

Documentation

For more detailed information about Gitea, visit the official documentation.

Getting Started with Gitea

Accessing Gitea

  1. URL: Access Gitea locally via http://localhost:3030/ (or your configured external URL).
  2. Login/Registration:
    • The first time you access Gitea, you might need to go through an initial setup process or register an administrator account.
    • For subsequent access, log in with your Gitea credentials.

Basic Usage

  1. Create a Repository:

    • Once logged in, look for a "New Repository" button (often a "+" icon in the header).
    • Give your repository a name, description, and choose visibility (public or private).
    • You can initialize it with a README, .gitignore, and license if desired.
  2. Cloning a Repository:

    • On the repository page, find the clone URL (HTTPS or SSH).
    • Use this URL with the git clone command in your local terminal or within Code Server's terminal:
      git clone http://localhost:3030/YourUsername/YourRepository.git
      
  3. Making Changes and Pushing:

    • Make changes to files in your cloned repository locally.
    • Use standard Git commands to commit and push your changes:
      git add .
      git commit -m "Your commit message"
      git push origin main # Or your default branch name
      
  4. Using the Web Interface:

    • Browse Files: View files and commit history directly in Gitea.
    • Issues: Track bugs, feature requests, or tasks.
    • Pull Requests: If collaborating, use pull requests to review and merge changes.
    • Settings: Manage repository settings, collaborators, webhooks, etc.

Use Cases within Changemaker

  • Version Control for Documentation: Store and manage the Markdown files for your MkDocs site in a Gitea repository. This allows you to track changes, revert to previous versions, and collaborate on content.
  • Code Management: If you are developing any custom code or scripts for your Changemaker instance or related projects.
  • Configuration File Management: Keep track of important configuration files with version history.
  • Collaborative Content Development: Teams can work on documents, with changes reviewed via pull requests before merging.

Editing the Site

While Gitea hosts the source files (e.g., Markdown files for this documentation), the actual editing process for this MkDocs site is typically done using Code Server. You would: 1. Clone your documentation repository from Gitea to your local workspace (or open it directly if it's already part of your Changemaker file structure accessible by Code Server). 2. Edit the Markdown files using Code Server. 3. Commit and push your changes back to Gitea using Git commands in the Code Server terminal.

Further Information