-
-
Notifications
You must be signed in to change notification settings - Fork 181
Expand file tree
/
Copy pathsample-conf.yaml
More file actions
443 lines (358 loc) · 18.2 KB
/
sample-conf.yaml
File metadata and controls
443 lines (358 loc) · 18.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
---
# +-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+
# |G|E|N|E|R|A|L| |C|O|N|F|I|G|U|R|A|T|I|O|N|
# +-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+
# Which provider to clone from (github, gitlab, gitea or bitbucket)
# default: github
# flag (--scm, -s) eg: --scm=gitlab
GHORG_SCM_TYPE: github
# How you'd like to clone the repos (https or ssh)
# default: https
# flag (--protocol) eg: --protocol=https
GHORG_CLONE_PROTOCOL: https
# Override SSH hostname in clone URLs. Useful when you have multiple SSH host
# aliases in your ~/.ssh/config for the same SCM provider.
# For example, setting this to "my-github-alias" will change clone URLs from:
# git@github.com:org/repo.git -> git@my-github-alias:org/repo.git
# Only applies when using SSH clone protocol (--protocol=ssh)
# flag (--ssh-hostname) eg: --ssh-hostname=my-github-alias
GHORG_SSH_HOSTNAME:
# This is where your ghorg directory will be created, use absolute pathing, shell expansions will not work.
# The ghorg directory is the home for all ghorg clones
# See https://github.com/gabrie30/ghorg#changing-clone-directories for example
# default: YOUR_HOME_DIR/ghorg
# flag (--path, -p) eg: --path=/tmp/ghorg
GHORG_ABSOLUTE_PATH_TO_CLONE_TO:
# Folder ghorg will clone all repos into. Cloning will result in: GHORG_ABSOLUTE_PATH_TO_CLONE_TO/GHORG_OUTPUT_DIR/repo
# See https://github.com/gabrie30/ghorg#changing-clone-directories for example
# default: org/user you are cloning, e.g. 'ghorg clone kubernetes' would create a kubernetes directory inside your ghorg directory
# flag (--output-dir) eg: --output-dir=testing
GHORG_OUTPUT_DIR:
# Type of entity to clone (user or org)
# flag (--clone-type, -c) eg: --clone-type=user
GHORG_CLONE_TYPE: org
# Change SCM api base url, this is for on self hosted scm instances only
# For http gitlab instances see GHORG_INSECURE_GITLAB_CLIENT
# default: github/gitlab/bitbucket public apis
# flag (--base-url) eg: --base-url=https://my.self.hosted.scm.instance.com
GHORG_SCM_BASE_URL:
# Include submodules in all clone and pull operations.
# flag (--include-submodules)
GHORG_INCLUDE_SUBMODULES: false
# Appends the scm cloud hostname to the GHORG_ABSOLUTE_PATH_TO_CLONE_TO
# This will organize your clones into specific folders by the scm provider.
# e.g. GHORG_ABSOLUTE_PATH_TO_CLONE_TO/github.com/kuberentes")
# flag (--preserve-scm-hostname)
GHORG_PRESERVE_SCM_HOSTNAME: false
# Allows you to pass arguments to git's filter flag e.g. git clone --filter=<args> this requires git version 2.19 or greater.
# Useful for filtering out binary objects from repos
# Few caveats, only works on inital clones, however if done on inital clone all subsequent clones will also honor the settings.
# More info at https://stackoverflow.com/questions/49917616/what-is-the-git-clone-filter-options-syntax
# flag (--git-filter) eg: --git-filter=blob:none
GHORG_GIT_FILTER:
# Deletes all files/directories found in your local clone directory that are not found on the remote (e.g., after remote deletion). With GHORG_SKIP_ARCHIVED set, archived repositories will also be pruned from your local clone.
# Will prompt before deleting any files unless used in combination with --prune-no-confirm
# flag (--prune)
GHORG_PRUNE: false
# Skip interactive y/n prompt when pruning clones (can only be used in combination with --prune).
# flag (--prune-no-confirm)
GHORG_PRUNE_NO_CONFIRM: false
# Prune repositories that are considered untouched. A repository is considered untouched if there are:
# 1. No new branches or zero branches
# 2. No new commits
# 3. No modified changes
# flag (--prune-untouched)
GHORG_PRUNE_UNTOUCHED: false
# Automatically delete repos without showing an interactive confirmation prompt.
# flag (--prune-untouched-no-confirm)
GHORG_PRUNE_UNTOUCHED_NO_CONFIRM: false
# Color output (enabled, disabled)
# flag( --color) eg: --color=enabled eg: --color=disabled
GHORG_COLOR: disabled
# Skip archived repos, currently github/gitlab/gitea only
# flag (--skip-archived)
GHORG_SKIP_ARCHIVED: false
# Skip repos that are forks, currently github/gitlab/gitea only
# flag (--skip-forks)
GHORG_SKIP_FORKS: false
# Backup mode, clone as mirror, no working copy (ignores branch parameter)
# flag (--backup)
GHORG_BACKUP: false
# Max goroutines created while cloning
# flag (--concurrency) eg: --concurrency=1
GHORG_CONCURRENCY: 25
# Delay in seconds between cloning repos. Useful for rate limiting
# flag (--clone-delay-seconds) eg: --clone-delay-seconds=5
# NOTE: When set to > 0, GHORG_CONCURRENCY is automatically set to 1
GHORG_CLONE_DELAY_SECONDS: 0
# Create a shallow clone with a history truncated to the specified number of commits
# https://git-scm.com/docs/git-clone#Documentation/git-clone.txt---depthltdepthgt
# flag (--clone-depth) eg: --clone-depth=1
GHORG_CLONE_DEPTH:
# Path to file with list of repo names to clone, file should contain one repo name per line
# This allows you to only clone a specific list of repos
# flag (--target-repos-path)
GHORG_TARGET_REPOS_PATH:
# A comma separated list of topics to filter by, currently github/gitlab/gitea only
# flag (--topics) eg: --topics=frontend
# If any topics exist here, ghorg will only clone repos that match at least one of these topics
GHORG_TOPICS:
# Only clone repos with matching prefix, can be a comma separated list
# flag (--match-prefix) eg: --match-prefix=backend
GHORG_MATCH_PREFIX:
# Exclude cloning repos with matching prefix, can be a comma separated list
# flag (--exclude-match-prefix) eg: --exclude-match-prefix=backend
GHORG_EXCLUDE_MATCH_PREFIX:
# Only clone repos that match name to regex provided
# flag (--match-regex) eg: --match-regex=^foo
GHORG_MATCH_REGEX:
# Exclude cloning repos that match name to regex provided
# flag (--exclude-match-regex) eg: --exclude-match-regex=^foo
GHORG_EXCLUDE_MATCH_REGEX:
# Only clones new repos and does not perform git checkout, clean, reset, or pull on existing repos.
# Existing repos will only have their remote URL updated (and optionally fetch if --fetch-all is set).
#
# Use cases:
# --no-clean Existing repos left completely untouched (only remote URL updated)
# --no-clean --fetch-all Fetch-only mode: fetches all remote branches without modifying working directory
#
# Compare to --protect-local:
# --no-clean skips ALL existing repos regardless of their state
# --protect-local only skips repos that have uncommitted changes or unpushed commits
#
# flag (--no-clean)
GHORG_NO_CLEAN: false
# Skip updating repositories that have local changes (uncommitted changes or unpushed commits).
# Clean repos (no local modifications) will still be updated normally.
#
# Additionally, if you are on a branch other than the default branch, ghorg will restore
# your original branch after pulling the default branch. This protects your working context.
#
# What --protect-local protects:
# - Uncommitted changes: repos with dirty working directory are skipped
# - Unpushed commits: repos with commits ahead of remote are skipped
# - Current branch: restores your original branch after pulling default branch
#
# Use cases:
# --protect-local Safe re-clone: updates clean repos, skips dirty ones, restores branches
# --protect-local --dry-run Preview which repos would be skipped due to local changes
#
# Compare to --no-clean:
# --no-clean skips ALL existing repos regardless of their state
# --protect-local only skips repos that have local changes, and restores your branch checkout
#
# flag (--protect-local)
GHORG_PROTECT_LOCAL: false
# Additionally clone the wiki page for repo
# flag (--clone-wiki)
GHORG_CLONE_WIKI: false
# Fetches all remote branches for each repo by running git fetch --all.
# This updates remote-tracking branches without modifying your working directory or current branch.
#
# Use cases:
# --fetch-all Get all branch updates (combined with normal pull workflow)
# --no-clean --fetch-all Fetch-only mode: fetch without checkout/clean/reset/pull
# --fetch-all --fetch-prune Fetch all and remove stale remote-tracking branches
#
# flag (--fetch-all)
GHORG_FETCH_ALL: false
# Remove stale remote-tracking branches during fetch by adding --prune to git fetch.
# Only applies when --fetch-all is used. Removes local references to branches that no longer exist on remote.
#
# IMPORTANT: This is different from --prune!
# --fetch-prune Removes stale REMOTE-TRACKING branches (git refs like origin/deleted-branch)
# --prune Removes LOCAL CLONE DIRECTORIES for repos that no longer exist on remote
#
# Use cases:
# --fetch-all --fetch-prune Fetch all branches and clean up stale remote-tracking refs
#
# flag (--fetch-prune)
GHORG_FETCH_PRUNE: false
# If you want to set a path other than $HOME/.config/ghorg/ghorgignore for your ghorgignore
# flag (--ghorgignore-path)
GHORG_IGNORE_PATH:
# If you want to set a path other than $HOME/.config/ghorg/ghorgonly for your ghorgonly
# flag (--ghorgonly-path)
GHORG_ONLY_PATH:
# Only emit critical output.
# flag (--quiet)
GHORG_QUIET: false
# Perform a dry run of the clone; fetches repos but does not clone them.
# flag (--dry-run)
GHORG_DRY_RUN: false
# Branch ghorg resets and leaves checked out
# default: default branch
# NOTE: if no default branch is found on the repo, will fallback to using master
# flag (--branch, -b) eg: --branch=develop
GHORG_BRANCH:
# Allows you to control the exit code when ghorg runs into a problem (info level message) cloning a repo from the remote.
# Info messages will appear after a clone is complete, similar to success messages
# flag (--exit-code-on-clone-infos)
GHORG_EXIT_CODE_ON_CLONE_INFOS: 0
# Allows you to control the exit code when ghorg runs into a problem (issue level message) cloning a repo from the remote.
# Issue messages will appear after a clone is complete, similar to success messages.
# flag (--exit-code-on-clone-issues)
GHORG_EXIT_CODE_ON_CLONE_ISSUES: 1
# Allows you to run ghorg with no token (GHORG_<SCM>_TOKEN), SCM server needs to specify no auth required for api calls
# flag (--no-token)
GHORG_NO_TOKEN: false
# Skips the calculation of the output directory size at the end of a clone operation.
# This can save time, especially when cloning a large number of repositories.
# This is enabled by default
# flag (--no-dir-size)
GHORG_NO_DIR_SIZE: false
# Creates a CSV in the GHORG_ABSOLUTE_PATH_TO_CLONE_TO called _ghorg_stats.csv with info about each clone
# This allows you to track clone data over time such as number of commits and size in megabytes of the clone directory.
# If the header of the CSV changes, it will create a new file of _ghorg_stats_new_header_${sha256HashOfHeader}.csv this is how we will handle breaking changes to the CSV over time
# More information at https://github.com/gabrie30/ghorg?tab=readme-ov-file#tracking-clone-data-over-time
# flag (--stats-enabled)
GHORG_STATS_ENABLED: false
# Specifies the location of your ghorg conf.yaml, allowing you to have many configuration files, or none at all
# default: ghorg looks in $HOME/.config/ghorg/conf.yaml, if not set in that location nor as a commandline flag, ghorg will use all default values
# NOTE: this cannot be set in the configuration file. Its supported through CLI flag and ENV var only.
# flag (--config)
# GHORG_CONFIG:
# Get verbose debugging output
# NOTE: This setting cannot be configured through the configuration file or the CLI. It can only be set as an environment variable.
# For example: GHORG_DEBUG=true ghorg clone kubernetes
# When using this env concurrency is set to a value of 1, this behavior can be overwritten for debugging concurrency issues by setting GHORG_CONCURRENCY_DEBUG=true in addition to setting GHORG_DEBUG=true
# Note when this is enabled the api key used will be printed to stdout
# GHORG_DEBUG:
# +-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+
# |G|I|T|H|U|B| |S|P|E|C|I|F|I|C|
# +-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+
# Add your GitHub token
# flag (--token, -t) eg: --token=bGVhdmUgYSBjb21tZW50IG9uIGlzc3VlIDY2 or --token=~/path/to/file/containing/token
GHORG_GITHUB_TOKEN:
# Indicate that the Github token should be treated as an app token. Needed if you already obtained a github app token outside the context of ghorg.
# flag (--github-token-from-github-app)
GHORG_GITHUB_TOKEN_FROM_GITHUB_APP: false
# Path to your GitHub App PEM file, for authenticating with GitHub App
# e.g. /home/user/foo/ghorg-app.pem
# flag (--github-app-pem-path)
GHORG_GITHUB_APP_PEM_PATH:
# GitHub App Installation ID, for authenticating with GitHub App
# flag (--github-app-installation-id)
GHORG_GITHUB_APP_INSTALLATION_ID:
# GitHub App ID, for authenticating with GitHub App
# flag (--github-app-id)
GHORG_GITHUB_APP_ID:
# Only available when also using GHORG_CLONE_TYPE: user e.g. --clone-type=user
# Can be one of: all, owner, member (default: owner)
GHORG_GITHUB_USER_OPTION:
# Clone all of a user's gists into clone-dir/ghorg-gists
# Only available when using GHORG_SCM_TYPE: github and GHORG_CLONE_TYPE: user
# flag (--github-user-gists)
GHORG_GITHUB_USER_GISTS: false
# Filter repos by a language
# Can be a comma separated value with no spaces
# falg (--github-filter-language) e.g.: --github-filter-language=go,ruby,elixir
GHORG_GITHUB_FILTER_LANGUAGE:
# Optional: max concurrent GitHub REST requests while listing org/user repos (pagination only).
# If unset or empty, ghorg lists all pages in parallel (fastest; very large orgs may hit GitHub secondary rate limits).
# Set to a number (e.g. 8 or 1) to throttle listing when you see rate-limit errors.
# This is NOT GHORG_CONCURRENCY: that setting only controls parallel git clones after the repo list is built.
# flag (--github-repo-list-concurrency)
GHORG_GITHUB_REPO_LIST_CONCURRENCY:
# +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
# |G|I|T|L|A|B| |S|P|E|C|I|F|I|C|
# +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
# Add your GitLab token
# flag (--token, -t) eg: --token=bGVhdmUgYSBjb21tZW50IG9uIGlzc3VlIDY2 or --token=~/path/to/file/containing/token
GHORG_GITLAB_TOKEN:
# clones repos in a directory structure that matches gitlab namespaces eg company/unit/subunit/app would clone into ghorg/org/unit/subunit/app
# flag (--preserve-dir)
GHORG_PRESERVE_DIRECTORY_STRUCTURE: false
# Skip TLS certificate verification for hosted gitlab instances
# flag (--insecure-gitlab-client)
GHORG_INSECURE_GITLAB_CLIENT: false
# Only clone gitlab groups that match name to regex provided
# flag (--gitlab-group-match-regex)
GHORG_GITLAB_GROUP_MATCH_REGEX:
# Exclude gitlab groups by regex
# flag (--gitlab-group-exclude-match-regex)
GHORG_GITLAB_GROUP_EXCLUDE_MATCH_REGEX:
# Additionally clone all snippets
# flag (--clone-snippets)
GHORG_CLONE_SNIPPETS: false
# +-+-+-+-+-+ +-+-+-+-+-+-+-+-+
# |G|I|T|E|A| |S|P|E|C|I|F|I|C|
# +-+-+-+-+-+ +-+-+-+-+-+-+-+-+
# Add your Gitea token
# Settings -> Applications -> Generate Token
# flag (--token, -t) eg: --token=bGVhdmUgYSBjb21tZW50IG9uIGlzc3VlIDY2 or --token=~/path/to/file/containing/token
GHORG_GITEA_TOKEN:
# Must be present if your gitea instance uses http
# flag (--insecure-gitea-client)
GHORG_INSECURE_GITEA_CLIENT: false
# +-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+
# |B|I|T|B|U|C|K|E|T| |S|P|E|C|I|F|I|C|
# +-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+
# ========== NEW API TOKEN AUTHENTICATION (Recommended for Bitbucket Cloud) ==========
# Bitbucket has deprecated App Passwords in favor of API Tokens.
# For Bitbucket Cloud, use API tokens with your Atlassian account email.
# https://support.atlassian.com/bitbucket-cloud/docs/create-an-api-token/
#
# IMPORTANT: When creating the API token, grant ALL READ SCOPES:
# - Account: Read
# - Workspace membership: Read
# - Projects: Read
# - Repositories: Read
# This ensures ghorg can list and clone all repositories in your workspace.
# Your Bitbucket API token (new authentication method)
# When using API tokens, ghorg uses x-bitbucket-api-token-auth as the git username
# flag (--token, -t) eg: --token=your_api_token
GHORG_BITBUCKET_API_TOKEN:
# Your Atlassian account email (required when using GHORG_BITBUCKET_API_TOKEN)
# This is the email you use to log in to Atlassian/Bitbucket
# If not set, falls back to GHORG_BITBUCKET_USERNAME
# flag (--bitbucket-api-email) eg: --bitbucket-api-email=you@example.com
GHORG_BITBUCKET_API_EMAIL:
# ========== LEGACY APP PASSWORD AUTHENTICATION ==========
# For backward compatibility with existing setups
# Add your Bitbucket app password (legacy authentication method)
# https://confluence.atlassian.com/bitbucket/app-passwords-828781300.html
# flag (--token, -t) eg: --token=bGVhdmUgYSBjb21tZW50IG9uIGlzc3VlIDY2
GHORG_BITBUCKET_APP_PASSWORD:
# Your Bitbucket username (used with GHORG_BITBUCKET_APP_PASSWORD)
# flag (--bitbucket-username) eg: --bitbucket-username=user123
GHORG_BITBUCKET_USERNAME:
# ========== OAUTH TOKEN AUTHENTICATION ==========
# For Bitbucket Server personal access tokens or OAuth
# When using this OAuth/PAT token, do not set the bitbucket username flag.
# https://confluence.atlassian.com/bitbucketserver/personal-access-tokens-939515499.html
# flag (--token, -t) eg: --token=bGVhdmUgYSBjb21tZW50IG9uIGlzc3VlIDY2
GHORG_BITBUCKET_OAUTH_TOKEN:
# +-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+
# |S|O|U|R|C|E|H|U|T| |S|P|E|C|I|F|I|C|
# +-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+
# Add your Sourcehut personal access token token (https://meta.sr.ht/oauth2). This token requires the REPOSITORIES and OBJECT permissions.
# flag (--token, -t) eg: --token=bGVhdmUgYSBjb21tZW50IG9uIGlzc3VlIDY2 or --token=~/path/to/file/containing/token
GHORG_SOURCEHUT_TOKEN:
# Must be present if your sourcehut instance uses http
# flag (--insecure-sourcehut-client)
GHORG_INSECURE_SOURCEHUT_CLIENT: false
# +-+-+-+-+-+ +-+-+-+-+-+-+-+
# |G|H|O|R|G| |R|E|C|L|O|N|E|
# +-+-+-+-+-+ +-+-+-+-+-+-+-+
# Configuration for ghorg reclone command
# See https://github.com/gabrie30/ghorg#reclone-command for more information on how to setup and use
# If set allows you to specify the location of your reclone.yaml
# Defaults to $HOME/.config/ghorg/reclone.yaml
# flag (--reclone-path)
GHORG_RECLONE_PATH:
# Quiet logging output with reclone command
# flag (--quiet)
GHORG_RECLONE_QUIET: false
# +-+-+-+-+-+ +-+-+-+-+-+-+-+ +-+-+-+-+-+-+
# |G|H|O|R|G| |R|E|C|L|O|N|E| |S|E|R|V|E|R|
# +-+-+-+-+-+ +-+-+-+-+-+-+-+ +-+-+-+-+-+-+
# Port to run the relcone server on
# flag (--port) e.g. --port=3000
GHORG_RECLONE_SERVER_PORT: ":8080"
# +-+-+-+-+-+ +-+-+-+-+-+-+-+ +-+-+-+-+
# |G|H|O|R|G| |R|E|C|L|O|N|E| |C|R|O|N|
# +-+-+-+-+-+ +-+-+-+-+-+-+-+ +-+-+-+-+
# Number of minutes to run the cron on
# flag (--minutes) e.g. --minutes=1440
GHORG_CRON_TIMER_MINUTES: "60"