Skip to content

Commit a43353d

Browse files
authored
Merge branch 'main' into main
2 parents 3e01788 + e6bac69 commit a43353d

2 files changed

Lines changed: 67 additions & 0 deletions

File tree

specs/git/clone-with-ssh.yaml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
name: Clone git repository with specific SSH Key and User
3+
command: |-
4+
git -c core.sshCommand='ssh -i {{sshKeyPath}} -o IdentitiesOnly=yes' clone {{repositoryUrl}} {{targetFolder}}
5+
cd {{targetFolder}}
6+
git config core.sshCommand 'ssh -i {{sshKeyPath}}'
7+
git config user.name "{{userName}}"
8+
git config user.email {{userEmail}}
9+
tags:
10+
- git
11+
- ssh
12+
description: Clones a git repository given a specific SSH Key Path and configures it to use the desired Name and Email
13+
arguments:
14+
- name: sshKeyPath
15+
description: The path of the SSH Key to be used
16+
default_value: ~/.ssh/id_rsa
17+
- name: repositoryUrl
18+
description: The SSH URL of the git repository
19+
default_value: <repo_url>
20+
- name: targetFolder
21+
description: The name of the folder in which the repository should be cloned into
22+
default_value: <target_folder>
23+
- name: userName
24+
description: The Name of the User to be configured for the git repository
25+
default_value: Jhon Doe
26+
- name: userEmail
27+
description: The Email of the User to be configured for the git repository
28+
default_value: johndoe@example.com
29+
source_url: "https://github.com/charlieVader/warp-workflows/blob/master/git/clone-with-ssh.yaml"
30+
author: charlieVader
31+
author_url: "https://github.com/charlieVader"
32+
shells: []
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
---
2+
# The name of the workflow.
3+
name: Clone all repos in a GitHub Organization
4+
# The corresponding command for the workflow. Any arguments should be surrounded with two curly braces. E.g `command {{arg}}`.
5+
command: |-
6+
curl -s -H "Authorization: token {{auth_token}}" "https://api.github.com/orgs/{{org}}/repos?page={{page}}&per_page=100" | jq -r ".[].clone_url" | xargs -L1 git clone
7+
# Any tags that the workflow should be categorized with.
8+
tags:
9+
- git
10+
- github
11+
# A description of the workflow.
12+
description: Uses the GitHub API to retrieve a list of repos (up to 100 per page) and clones them.
13+
# List of arguments within the command.
14+
arguments:
15+
# Name of the argument within the command. This must exactly match the name of the argument
16+
# within the command (without the curly braces).
17+
- name: auth_token
18+
# The description of the argument.
19+
description: A personal Authorization Token created on GitHub (may need to enable SAML after token is created) https://github.com/settings/tokens
20+
- name: org
21+
description: The organization name (ex. facebook)
22+
# The default value for the argument.
23+
default_value: facebook
24+
- name: page
25+
description: Page number
26+
default_value: 1
27+
# The source URL for where the workflow was generated from, if any.
28+
source_url: "https://medium.com/rigor-guild/clone-all-github-repositories-in-an-organization-36ab87b94d7c"
29+
# The author of the workflow.
30+
author: Carlos Buenosvinos
31+
# The URL of original author of the Workflow. For example, if this workflow was generated from StackOverflow, the `author_url` would be the StackOverflow author's profile page.
32+
author_url: "https://medium.com/@carlosbuenosvinos"
33+
# The valid shells where this workflow should be active. If valid for all shells, this can be left empty.
34+
# See FORMAT.md for the full list of accepted values.
35+
shells: []

0 commit comments

Comments
 (0)