Add Gitea Management Guide with authentication, organization, and repository management instructions

This commit is contained in:
Le Hoang Nam 2025-04-10 15:52:07 +07:00
parent bac244ddde
commit f3f2383d5a

122
gitea-management-guide.md Normal file
View File

@ -0,0 +1,122 @@
# **Gitea Management Guide**
## Overview
This guide provides a structured approach to managing Gitea, covering organizations, repositories, permissions, and integrations. It emphasizes security, streamlined collaboration, and automation to enhance software development workflows.
---
## 1. Authentication
### Signing Up for Gitea
- Open [https://gitea.plp19.com/](https://gitea.plp19.com/) and click **"Sign in with AzureAD"**.
- Follow the on-screen prompts to authenticate using your AzureAD account.
- Choose a username and complete the setup process.
- After signing in, navigate to **User Settings > Account** and create a new password for enhanced security.
### Signing In to Gitea
- Open [https://gitea.plp19.com/](https://gitea.plp19.com/).
- Click **"Sign in with AzureAD"** to access your account.
---
## 2. Creating an Organization and Managing Permissions
Only the Head of Department (HoD) is authorized to create and configure an organization.
### Creating a New Organization
- Click the **"+"** icon in the top-right and select **"New Organization"**.
- Enter an **Organization Name**.
- Set **Visibility** to **Private** (except for special organizations that may be **Public**).
- Under **Permissions**, enable **"Repository admin can add and remove team access."**
- Click **"Create Organization"**.
### Configuring Teams
#### Builders Team
- Navigate to the **"Teams"** tab and click **"New Team"**.
- Enter **Team Name**: **Builders**.
- Set **Repository Access**: Allow access to **All repositories**.
- Set **Permissions**:
- **Code**: Write.
- **All Other**: No Access.
- Add only the user `jenkins` and save changes.
#### Leaders Team
- Navigate to the **"Teams"** tab and click **"New Team"**.
- Enter **Team Name**: **Leaders**.
- Set **Repository Access**: Allow access to **All Repositories** and enable **Create Repositories**.
- Set **Permission**: **Administrator Access**.
- Add only the **Team Leaders** and save changes.
#### Developers Team
- Navigate to the **"Teams"** tab and click **"New Team"**.
- Enter **Team Name**: **Developers**.
- Set **Repository Access**: Allow access to **All Repositories**.
- Set **Permissions**:
- **Code**: Write access (modify source code, commit changes, push branches).
- **Issues**: Write access (create, comment, manage issues).
- **Pull Request**: Write access (create, review, merge pull requests).
- **Wiki**: Write access (create, edit, manage wiki pages).
- **Project**: Write access (create, edit, manage project boards).
- **Releases**: Read access (view releases).
- **Packages**: Read access (view and download packages).
- Add relevant users and save changes.
---
## 3. Creating and Managing Repositories
Only the Head of Department and Team Leaders are authorized to create and configure repositories.
### Creating a New Repository
- Click the **"+"** icon in the top-right and select **"New Repository"**.
- Enter an **Organization Name**.
- Enter Repository Details:
- **Owner**: Choose the organization as the owner (personal accounts are not allowed).
- **Repository Name**: Choose a descriptive name.
- **Description**: (Optional) Add a brief description.
- **Visibility**: Set to **Private** (except for special projects that may be **Public**).
- **Default Branch**: Set to **develop** for consistency.
- Click **Create Repository** to finalize.
### Configuring Repository Settings
- Navigate to the repository and click on the **Settings** tab.
- **Disable Non-Essential Features**:
- Wiki
- Issues
- Projects
- Releases
- Packages
- **Pull Request Configuration**:
- Enable **Delete pull request branch after merging by default**.
- Enable **Ignore Whitespace for Conflicts**.
### Adding Branch Protection for `develop` and `master`
- Navigate to the **Branches** tab and select **Add New Rule**.
- Set **Protected Branch Name Pattern**: `develop` / `master`.
- Enable **Restrict approvals to whitelisted users or teams**.
- Select **Whitelisted teams for reviews**: `Leaders`.
- Enable **Merge Whitelist**.
- Select **Whitelisted teams for merging**: `Leaders`.
- Enable the following options:
- **Block merge on rejected reviews**
- **Block merge on official review requests**
- **Block merge if pull request is outdated**
- Click **Save Rule**.
---
## Conclusion
By following these structured guidelines, teams can effectively manage Gitea repositories while maintaining security, collaboration, and workflow efficiency. Proper team assignments and repository configurations help streamline development processes, enforce best practices, and ensure controlled access to critical resources.