> ## Documentation Index
> Fetch the complete documentation index at: https://docs.trainy.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Git-SSH Secrets

> Example task yamls for secrets

## Prerequisites

#### Setup

1. Set up a GitHub SSH key <a href="https://docs.github.com/en/authentication/connecting-to-github-with-ssh/adding-a-new-ssh-key-to-your-github-account" target="_blank">here</a>.
2. For this example, the generated private key will be in `test_ssh_key`
3. Create a `--kind=git-ssh` secret

```
$ konduktor secret create --kind=git-ssh --from-file=test_ssh_key my-ssh-name
```

4. Check that the secret was properly created with:

```
$ konduktor secret list
```

For more details, check out the setup of secrets <a href="/secrets" target="_blank">here</a>.

#### Current Working Directory

```
$ ls
task.yaml   test_ssh_key
$ cat test_ssh_key
-----BEGIN OPENSSH PRIVATE KEY-----
b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAAAaAAAABNlY2RzYS
1zaGEyLW5pc3RwMjU2AAAACG5pc3RwMjU2AAAAQQR9WZPeBSvixkhjQOh9yCXXlEx5CN9M
yh94CJJ1rigf8693gc90HmahIR5oMGHwlqMoS7kKrRw+4KpxqsF7LGvxAAAAqJZtgRuWbY
EbAAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBH1Zk94FK+LGSGNA
6H3IJdeUTHkI30zKH3gIknWuKB/zr3eBz3QeZqEhHmgwYfCWoyhLuQqtHD7gqnGqwXssa/
EAAAAgBzKpRmMyXZ4jnSt3ARz0ul6R79AXAr5gQqDAmoFeEKwAAAAOYWpAYm93aWUubG9j
YWwBAg==
-----END OPENSSH PRIVATE KEY-----
```

#### Launching

```
$ konduktor launch task.yaml
```

## Task.yaml

```
name: git-ssh-secrets

resources:
  cpus: 1
  memory: 1
  image_id: ubuntu
  labels:
    kueue.x-k8s.io/queue-name: user-queue
    maxRunDurationSeconds: "3200"

run: |
  git clone git@github.com:<user-name>/<app-name>.git
```
