Skip to content

Commit 9d11be7

Browse files
authored
Merge pull request #306 from wrongerror/main
update prerequisites doc
2 parents 829f245 + e4f77f7 commit 9d11be7

File tree

1 file changed

+13
-6
lines changed

1 file changed

+13
-6
lines changed

content/en/docs/getting-started/Quickstarts/prerequisites.md

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,19 @@ kubectl create secret docker-registry push-secret \
2525

2626
If your source code is in a private git repository, you'll need to create a secret containing the private git repo's username and password:
2727

28-
```bash
29-
USERNAME=<your_git_username>
30-
PASSWORD=<your_git_password>
31-
kubectl create secret generic git-repo-secret \
32-
--username=$USERNAME \
33-
--password=$USERNAME
28+
```shell
29+
cat <<EOF | kubectl apply -f -
30+
apiVersion: v1
31+
kind: Secret
32+
metadata:
33+
name: git-repo-secret
34+
annotations:
35+
build.shipwright.io/referenced.secret: "true"
36+
type: kubernetes.io/basic-auth
37+
stringData:
38+
username: <cleartext username>
39+
password: <cleartext password>
40+
EOF
3441
```
3542

3643
You can then reference this secret in the `Function` CR's spec.build.srcRepo.credentials

0 commit comments

Comments
 (0)