mirror of
https://github.com/outbackdingo/ghorg.git
synced 2026-01-27 18:18:58 +00:00
Update gitlab.md
This commit is contained in:
@@ -5,43 +5,52 @@
|
||||
## Hosted GitLab Instances
|
||||
|
||||
|
||||
### Cloning All Groups
|
||||
|
||||
**Note: "all-groups" only works on hosted GitLab instances running 13.0.1 or greater**
|
||||
|
||||
1. Clone all groups on a **hosted gitlab** instance **preserving** the directory structure of subgroups
|
||||
1. Clone all groups **preserving the directory structure** of subgroups
|
||||
|
||||
```
|
||||
ghorg clone all-groups --base-url=https://<your.instance.gitlab.com> --scm=gitlab --token=XXXXXX --preserve-dir
|
||||
```
|
||||
|
||||
1. Clone all groups on an **insecure** instance **preserving the directory structure** of subgroups
|
||||
|
||||
```
|
||||
ghorg clone all-groups --base-url=http://<your.instance.gitlab.com> --scm=gitlab --token=XXXXXX --preserve-dir --insecure-gitlab-client
|
||||
### Cloning Specific Groups
|
||||
|
||||
1. Clone a single **group**, **preserving the directory structure** of subgroups within that group
|
||||
|
||||
```
|
||||
ghorg clone <gitlab_group> --base-url=https://<your.instance.gitlab.com> --scm=gitlab --preserve-dir
|
||||
```
|
||||
|
||||
1. Clone only a **subgroup**
|
||||
|
||||
```
|
||||
ghorg clone <gitlab_group>/<gitlab_sub_group> --base-url=https://<your.instance.gitlab.com> --scm=gitlab
|
||||
```
|
||||
|
||||
1. clone all repos that are **prefixed** with "frontend" **into a folder** called "design_only"
|
||||
|
||||
```
|
||||
ghorg clone <gitlab_group> --base-url=https://<your.instance.gitlab.com> --scm=gitlab --match-regex=^frontend --output-dir=design_only
|
||||
```
|
||||
### Cloning User Repos
|
||||
|
||||
1. Clone a **user** on a **hosted gitlab** instance using a **token** for auth
|
||||
|
||||
```
|
||||
ghorg clone <gitlab_username> --clone-type=user --base-url=https://<your.instance.gitlab.com> --scm=gitlab --token=bGVhdmUgYSBjb21tZW50IG9uIGlzc3VlIDY2
|
||||
```
|
||||
|
||||
1. Clone a **group** on a **hosted gitlab** instance **preserving** the directory structure of subgroups
|
||||
|
||||
```
|
||||
ghorg clone <gitlab_group> --base-url=https://<your.instance.gitlab.com> --scm=gitlab --preserve-dir
|
||||
```
|
||||
|
||||
1. Clone only a **subgroup** on a **hosted gitlab**
|
||||
|
||||
```
|
||||
ghorg clone <gitlab_group>/<gitlab_sub_group> --base-url=https://<your.instance.gitlab.com> --scm=gitlab
|
||||
```
|
||||
|
||||
1. clone all repos that are **prefixed** with "frontend" **into a folder** called "design_only" from a **group** on a **hosted gitlab** instance
|
||||
|
||||
```
|
||||
ghorg clone <gitlab_group> --base-url=https://<your.instance.gitlab.com> --scm=gitlab --match-regex=^frontend --output-dir=design_only
|
||||
```
|
||||
|
||||
## Cloud GitLab Orgs
|
||||
|
||||
eg. https://gitlab.com/gitlab-examples
|
||||
|
||||
1. clone all groups **preserving** the directory structure of subgroups
|
||||
1. clone **all groups**, **preserving the directory structure** of subgroups
|
||||
|
||||
```
|
||||
ghorg clone gitlab-examples --scm=gitlab --token=XXXXXX --preserve-dir
|
||||
|
||||
Reference in New Issue
Block a user