Công cụ phát triển
Dịch vụ Git tự lưu trữ gọn nhẹ với giao diện tương tự GitHub.
Một binary duy nhất, RAM tối thiểu (<100MB), chạy được trên Raspberry Pi
Giao diện quen thuộc với kho mã, pull request, issue, wiki và review mã
CI/CD tích hợp sẵn, tương thích với workflow GitHub Actions
Nhập từ GitHub, GitLab, Bitbucket bằng công cụ migration tích hợp sẵn
Hỗ trợ SQLite, PostgreSQL, MySQL, MSSQL, TiDB
Image chính thức và Helm chart cho triển khai container
# Download latest binary
wget -O gitea https://dl.gitea.com/gitea/1.21/gitea-1.21-linux-amd64
chmod +x gitea
# Run
./gitea web
# Access at http://localhost:3000Cài đặt bằng Docker:docker run -d --name=gitea -p 3000:3000 -p 222:22 \
-v /var/lib/gitea:/data gitea/gitea:latestTriển khai production với PostgreSQL:# Install PostgreSQL
sudo apt install postgresql
# Create DB & user
sudo -u postgres psql
CREATE DATABASE gitea;
CREATE USER gitea WITH PASSWORD 'password';
GRANT ALL PRIVILEGES ON DATABASE gitea TO gitea;
# Create gitea user
sudo adduser --system --group --disabled-password --shell /bin/bash --home /home/git git
# Download & install
sudo wget -O /usr/local/bin/gitea https://dl.gitea.com/gitea/1.21/gitea-1.21-linux-amd64
sudo chmod +x /usr/local/bin/gitea
# Create directories
sudo mkdir -p /var/lib/gitea/{custom,data,log}
sudo chown -R git:git /var/lib/gitea
sudo chmod -R 750 /var/lib/gitea
# Systemd service
sudo nano /etc/systemd/system/gitea.service
# [Service]
# User=git
# WorkingDirectory=/var/lib/gitea
# ExecStart=/usr/local/bin/gitea web --config /etc/gitea/app.ini
# Restart=always
sudo systemctl enable --now gitea
[server]
DOMAIN = git.yourdomain.com
HTTP_PORT = 3000
ROOT_URL = https://git.yourdomain.com/
[database]
DB_TYPE = postgres
HOST = localhost:5432
NAME = gitea
USER = gitea
PASSWD = password
[security]
INSTALL_LOCK = true
SECRET_KEY = generate_with_gitea_generate_secret
[service]
DISABLE_REGISTRATION = true
REQUIRE_SIGNIN_VIEW = falseGitea Actions (tệp .gitea/workflows/build.yml):name: Build
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '18'
- run: npm install && npm test
Bắt đầu trong vài phút với quá trình triển khai VPS đơn giản của chúng tôi
Được triển khai trong khoảng 2 phút • Truy cập root đầy đủ • Hỗ trợ bằng vé và email