update examples

This commit is contained in:
Jay Gabriels
2022-07-31 10:21:31 -07:00
parent 9043ef6653
commit 5885fa010c
5 changed files with 85 additions and 80 deletions

View File

@@ -1,25 +1,25 @@
# Bitbucket Examples
> Note: all command line arguments can be set in your $HOME/.config/ghorg/conf.yaml
> Note: all command line arguments can be set in your $HOME/.config/ghorg/conf.yaml for more information see the [configuration](https://github.com/gabrie30/ghorg#configuration) section of the readme
## Bitbucket Cloud
Clone the microsoft workspace using an app-password
1. Clone the microsoft workspace using an app-password
```
ghorg clone microsoft --scm=bitbucket --bitbucket-username=<your-username> --token=<app-password>
```
```
ghorg clone microsoft --scm=bitbucket --bitbucket-username=<your-username> --token=<app-password>
```
Clone the microsoft workspace using oauth token
1. Clone the microsoft workspace using oauth token
```
ghorg clone microsoft --scm=bitbucket --token=<oauth-token>
```
```
ghorg clone microsoft --scm=bitbucket --token=<oauth-token>
```
## Hosted Bitbucket
Clone a workspace on a hosted bitbucket instance using an app-password
1. Clone a workspace on a hosted bitbucket instance using an app-password
```
ghorg clone <workspace> --scm=bitbucket --bitbucket-username=<your-username> --token=<app-password> --base-url=https://<api.myhostedbb.com>/v2
```
```
ghorg clone <workspace> --scm=bitbucket --bitbucket-username=<your-username> --token=<app-password> --base-url=https://<api.myhostedbb.com>/v2
```

View File

@@ -1,21 +1,21 @@
# Gitea Examples
> Note: all command line arguments can be set in your $HOME/.config/ghorg/conf.yaml
> Note: all command line arguments can be set in your $HOME/.config/ghorg/conf.yaml for more information see the [configuration](https://github.com/gabrie30/ghorg#configuration) section of the readme
clone an **org**
1. Clone an **org**
```
ghorg clone <gitea_org> --base-url=https://<your-internal-gitea>.com --token=XXXXXXX
```
```
ghorg clone <gitea_org> --base-url=https://<your-internal-gitea>.com --token=XXXXXXX
```
clone a **users** repos
1. Clone a **users** repos
```
ghorg clone <gitea_username> --clone-type=user --base-url=https://<your-internal-gitea>.com --token=bGVhdmUgYSBjb21tZW50IG9uIGlzc3VlIDY2
```
```
ghorg clone <gitea_username> --clone-type=user --base-url=https://<your-internal-gitea>.com --token=bGVhdmUgYSBjb21tZW50IG9uIGlzc3VlIDY2
```
clone all repos from a **github org** that are **prefixed** with "frontend" **into a folder** called "design_only"
1. Clone all repos from a **github org** that are **prefixed** with "frontend" **into a folder** called "design_only"
```
ghorg clone <gitea_org> --match-regex=^frontend --output-dir=design_only --base-url=https://<your-internal-gitea>.com --token=XXXXXXX
```
```
ghorg clone <gitea_org> --match-regex=^frontend --output-dir=design_only --base-url=https://<your-internal-gitea>.com --token=XXXXXXX
```

View File

@@ -1,43 +1,43 @@
# GitHub Examples
> Note: all command line arguments can be set in your $HOME/.config/ghorg/conf.yaml
> Note: all command line arguments can be set in your $HOME/.config/ghorg/conf.yaml for more information see the [configuration](https://github.com/gabrie30/ghorg#configuration) section of the readme
## GitHub Cloud
clone an **org**, using a token on the commandline
1. Clone an **org**, using a token on the commandline
```
ghorg clone <github_org> --token=XXXXXX
```
```
ghorg clone <github_org> --token=XXXXXX
```
clone all repos from a **github org** that are **prefixed** with "frontend" **into a folder** called "design_only", assumes ghorg conf.yaml is setup with a token
1. Clone all repos from a **github org** that are **prefixed** with "frontend" **into a folder** called "design_only", assumes ghorg conf.yaml is setup with a token
```
ghorg clone <github_org> --match-regex=^frontend --output-dir=design_only --token=XXXXXX
```
```
ghorg clone <github_org> --match-regex=^frontend --output-dir=design_only --token=XXXXXX
```
clone a **users** repos, assumes ghorg conf.yaml is setup with a token
1. Clone a **users** repos, assumes ghorg conf.yaml is setup with a token
```
ghorg clone <github_username> --clone-type=user --token=bGVhdmUgYSBjb21tZW50IG9uIGlzc3VlIDY2
```
```
ghorg clone <github_username> --clone-type=user --token=bGVhdmUgYSBjb21tZW50IG9uIGlzc3VlIDY2
```
## GitHub Enterprise
clone an **org**
1. Clone an **org**
```
ghorg clone <github_org> --base-url=https://<your-hosted-github>.com --token=XXXXXX
```
```
ghorg clone <github_org> --base-url=https://<your-hosted-github>.com --token=XXXXXX
```
clone all repos from a **github org** that are **prefixed** with "frontend" **into a folder** called "design_only"
1. Clone all repos from a **github org** that are **prefixed** with "frontend" **into a folder** called "design_only"
```
ghorg clone <github_org> --match-regex=^frontend --output-dir=design_only --base-url=https://<your-hosted-github>.com --token=XXXXXX
```
```
ghorg clone <github_org> --match-regex=^frontend --output-dir=design_only --base-url=https://<your-hosted-github>.com --token=XXXXXX
```
clone a **users** repos
1. Clone a **users** repos
```
ghorg clone <github_username> --clone-type=user --base-url=https://<your-hosted-github>.com --token=XXXXXX
```
```
ghorg clone <github_username> --clone-type=user --base-url=https://<your-hosted-github>.com --token=XXXXXX
```

View File

@@ -1,54 +1,54 @@
# GitLab Examples
> Note: all command line arguments can be set in your $HOME/.config/ghorg/conf.yaml
> Note: all command line arguments can be set in your $HOME/.config/ghorg/conf.yaml for more information see the [configuration](https://github.com/gabrie30/ghorg#configuration) section of the readme
## Hosted GitLab Instances
**Note: "all-groups" only works on hosted GitLab instances running 13.0.1 or greater**
clone all groups on a **hosted gitlab** instance **preserving** the directory structure of subgroups
1. Clone all groups on a **hosted gitlab** instance **preserving** the directory structure of subgroups
```
ghorg clone all-groups --base-url=https://<your.instance.gitlab.com> --scm=gitlab --token=XXXXXX --preserve-dir
```
```
ghorg clone all-groups --base-url=https://<your.instance.gitlab.com> --scm=gitlab --token=XXXXXX --preserve-dir
```
clone a **user** on a **hosted gitlab** instance using a **token** for auth
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
```
```
ghorg clone <gitlab_username> --clone-type=user --base-url=https://<your.instance.gitlab.com> --scm=gitlab --token=bGVhdmUgYSBjb21tZW50IG9uIGlzc3VlIDY2
```
clone a **group** on a **hosted gitlab** instance **preserving** the directory structure of subgroups
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
```
```
ghorg clone <gitlab_group> --base-url=https://<your.instance.gitlab.com> --scm=gitlab --preserve-dir
```
clone only a **subgroup** on a **hosted gitlab**
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
```
```
ghorg clone <gitlab_group>/<gitlab_sub_group> --base-url=https://<your.instance.gitlab.com> --scm=gitlab
```
clone all repos that are **prefixed** with "frontend" **into a folder** called "design_only" from a **group** on a **hosted gitlab** instance
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
```
```
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
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
```
```
ghorg clone gitlab-examples --scm=gitlab --token=XXXXXX --preserve-dir
```
clone only a **subgroup**
1. clone only a **subgroup**
```
ghorg clone gitlab-examples/wayne-enterprises --scm=gitlab --token=XXXXXX
```
```
ghorg clone gitlab-examples/wayne-enterprises --scm=gitlab --token=XXXXXX
```