Skip to content

Commit d1b16fc

Browse files
committed
Add clone-with-ssh.yaml workflow
1 parent 57af410 commit d1b16fc

1 file changed

Lines changed: 32 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: []

0 commit comments

Comments
 (0)