You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs: update documentation for new features and add authentication guides
- Add step-by-step token creation guides for GitLab, GitHub, Bitbucket, CodeCommit, SSH
- Document retry, exclude branches, parallel, and pre-check features
- Add new workflow examples (exclude branches, parallel with retry)
- Update project structure and coverage info in development guide
- Update README with new features and inputs
### Step-by-Step: Creating a GitLab Personal Access Token
43
+
44
+
1. Log in to [GitLab](https://gitlab.com)
45
+
2. Click your **avatar** (top-right) → **Preferences**
46
+
3. In the left sidebar, click **Access Tokens**
47
+
4. Click **Add new token**
48
+
5. Configure:
49
+
- **Token name**: `git-mirror-action`
50
+
- **Expiration date**: Set an appropriate date (recommended: 1 year max)
51
+
- **Scopes**: Check `write_repository`
52
+
6. Click **Create personal access token**
53
+
7. **Copy the token immediately** — it will not be shown again
54
+
8. Add it as a GitHub secret named `GITLAB_TOKEN` ([how to add secrets](#adding-secrets-to-github-actions))
55
+
56
+
<br/>
57
+
58
+
### Alternative: GitLab Project Access Token
59
+
60
+
For organization-level access, use a Project Access Token instead:
34
61
35
-
### Creating a GitLab Token
62
+
1. Go to your **GitLab project** → **Settings** → **Access Tokens**
63
+
2. Create a token with `write_repository` scope and **Maintainer** role
64
+
3. Use the token the same way as a personal access token
36
65
37
-
1. Go to **GitLab** > **Settings** > **Access Tokens**
38
-
2. Create a token with `write_repository` scope
39
-
3. Add the token as a GitHub secret (`GITLAB_TOKEN`)
66
+
> **Note**: Project Access Tokens are available on GitLab Premium and higher. Free tier users should use Personal Access Tokens.
40
67
41
68
<br/>
42
69
@@ -52,11 +79,45 @@ Uses x-access-token authentication. The token is injected as `https://x-access-t
52
79
github_token: ${{ secrets.MIRROR_GITHUB_TOKEN }}
53
80
```
54
81
82
+
<br/>
83
+
55
84
### Required Token Scopes
56
85
57
-
- `repo`— Full control of private repositories (or `public_repo` for public repos)
86
+
| Scope | Purpose | Required |
87
+
|-------|---------|----------|
88
+
| `repo` | Full control of private repositories | Yes (private repos) |
89
+
| `public_repo` | Push to public repositories only | Yes (public repos) |
90
+
91
+
> **Important**: Do NOT use `${{ secrets.GITHUB_TOKEN }}` for cross-repository mirroring. It only has access to the current repository. Use a Personal Access Token (PAT) instead.
92
+
93
+
<br/>
94
+
95
+
### Step-by-Step: Creating a GitHub Fine-Grained PAT (Recommended)
96
+
97
+
1. Log in to [GitHub](https://github.com)
98
+
2. Click your **avatar** (top-right) → **Settings**
99
+
3. Scroll down in the left sidebar → **Developer settings**
9. Add it as a GitHub secret named `MIRROR_GITHUB_TOKEN`
112
+
113
+
<br/>
58
114
59
-
> **Note**: Do not use `${{ secrets.GITHUB_TOKEN }}` for cross-repository mirroring. It only has access to the current repository. Use a Personal Access Token (PAT) instead.
115
+
### Alternative: Classic PAT
116
+
117
+
1. Go to **Settings** → **Developer settings** → **Personal access tokens** → **Tokens (classic)**
118
+
2. Click **Generate new token (classic)**
119
+
3. Check `repo` scope (or `public_repo` for public repos only)
120
+
4. Generate and copy the token
60
121
61
122
<br/>
62
123
@@ -73,30 +134,47 @@ Uses username and app password authentication. Credentials are injected as `http
Your Bitbucket username is NOT your email. To find it:
170
+
1. Go to **Personal settings**
171
+
2. Your username is shown under **Atlassian account settings** or in the URL: `bitbucket.org/<username>/`
98
172
99
-
Ensure the runner has AWS credentials configured with `codecommit:GitPush` permissions. For GitHub Actions, use `aws-actions/configure-aws-credentials`:
173
+
<br/>
174
+
175
+
## AWS CodeCommit
176
+
177
+
CodeCommit uses IAM-based authentication via the Git credential helper. The URL is used as-is without token injection.
100
178
101
179
```yaml
102
180
- name: Configure AWS credentials
@@ -117,6 +195,60 @@ Ensure the runner has AWS credentials configured with `codecommit:GitPush` permi
0 commit comments