Reorganize Section to put getting permissions first
Some checks are pending
Some checks are pending
This commit is contained in:
parent
e4e29b039d
commit
a4cb106738
1 changed files with 27 additions and 44 deletions
|
@ -931,33 +931,7 @@ sudo systemctl enable forgejo-runner.service
|
|||
|
||||
**Important**: The runner must be registered with your Forgejo instance before it can start. This creates the required `.runner` configuration file.
|
||||
|
||||
**Step 1: Get Registration Token**
|
||||
1. Go to your Forgejo repository
|
||||
2. Navigate to **Settings → Actions → Runners**
|
||||
3. Click **"New runner"**
|
||||
4. Copy the registration token
|
||||
|
||||
**Step 2: Register the Runner**
|
||||
|
||||
```bash
|
||||
# Switch to SERVICE_USER to register the runner
|
||||
sudo su - SERVICE_USER
|
||||
|
||||
# Register the runner with your Forgejo instance
|
||||
forgejo-runner register \
|
||||
--instance https://your-forgejo-instance \
|
||||
--token YOUR_REGISTRATION_TOKEN \
|
||||
--name "ci-cd-runner" \
|
||||
--labels "ubuntu-latest,docker" \
|
||||
--no-interactive
|
||||
|
||||
# Exit SERVICE_USER shell
|
||||
exit
|
||||
```
|
||||
|
||||
**Important**: Replace `your-forgejo-instance` with your actual Forgejo instance URL and `YOUR_REGISTRATION_TOKEN` with the token you copied from Step 1.
|
||||
|
||||
**Forgejo Permissions Required**
|
||||
**Step 1: Get Permissions to Create Repository-level Runners**
|
||||
|
||||
To create a repository-level runner, you need **Repository Admin** or **Owner** permissions. Here's how to check and manage permissions:
|
||||
|
||||
|
@ -1021,24 +995,38 @@ To add an existing user as an Administrator of an existing repository in Forgejo
|
|||
|
||||
**Important Note**: If the user is already the Owner of the repository, then they do not have to add themselves as an Administrator of the repository and indeed cannot. Repository owners automatically have all administrative permissions.
|
||||
|
||||
**Site Admin Commands (if using CLI):**
|
||||
|
||||
If your Forgejo instance supports command-line administration:
|
||||
|
||||
```bash
|
||||
# Add user as repository admin via CLI
|
||||
forgejo admin user change-status --admin --username target-user
|
||||
|
||||
# Or manage repository access directly
|
||||
forgejo admin repo add-collaborator --repo owner/repo-name --user target-user --permission admin
|
||||
```
|
||||
|
||||
**Important Notes for Site Administrators:**
|
||||
- **Repository Admin** can manage the repository but cannot modify site-wide settings
|
||||
- **Site Admin** retains full control over the Forgejo instance
|
||||
- Changes take effect immediately for the user
|
||||
- Consider the security implications of granting admin access
|
||||
|
||||
**Step 2: Get Registration Token**
|
||||
1. Go to your Forgejo repository
|
||||
2. Navigate to **Settings → Actions → Runners**
|
||||
3. Click **"New runner"**
|
||||
4. Copy the registration token
|
||||
|
||||
**Step 3: Register the Runner**
|
||||
|
||||
```bash
|
||||
# Switch to SERVICE_USER to register the runner
|
||||
sudo su - SERVICE_USER
|
||||
|
||||
# Register the runner with your Forgejo instance
|
||||
forgejo-runner register \
|
||||
--instance https://your-forgejo-instance \
|
||||
--token YOUR_REGISTRATION_TOKEN \
|
||||
--name "ci-cd-runner" \
|
||||
--labels "ubuntu-latest,docker" \
|
||||
--no-interactive
|
||||
|
||||
# Exit SERVICE_USER shell
|
||||
exit
|
||||
```
|
||||
|
||||
**Important**: Replace `your-forgejo-instance` with your actual Forgejo instance URL and `YOUR_REGISTRATION_TOKEN` with the token you copied from Step 2.
|
||||
|
||||
**What this does**:
|
||||
- Creates the required `.runner` configuration file in the SERVICE_USER's home directory
|
||||
- Registers the runner with your Forgejo instance
|
||||
|
@ -1056,11 +1044,6 @@ sudo systemctl status forgejo-runner.service
|
|||
|
||||
**Expected Output**: The service should show "active (running)" status.
|
||||
|
||||
**What this does**:
|
||||
- Starts the Forgejo runner daemon as a system service
|
||||
- The runner will now be available to accept and execute workflows from your Forgejo instance
|
||||
- The service will automatically restart if it crashes or the system reboots
|
||||
|
||||
#### 7.6 Test Runner Configuration
|
||||
|
||||
```bash
|
||||
|
|
Loading…
Add table
Reference in a new issue