Created
May 11, 2020 10:28
-
-
Save pt033302/be0a63d03913a05df12f96fa4952465f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: v1 | |
kind: Secret | |
metadata: | |
name: git-ssh | |
annotations: | |
tekton.dev/git-0: github.com | |
type: kubernetes.io/ssh-auth | |
data: | |
# Generated by: | |
# cat id_rsa | base64 -w 0 | |
# This deploy key has read-only permissions on github.com/knative/build | |
ssh-privatekey: "" | |
# Generated by: | |
# ssh-keyscan github.com | base64 -w 0 | |
known_hosts: Z2l0aHViLmNvbSBzc2gtcnNhIEFBQUFCM056YUMxeWMyRUFBQUFCSXdBQUFRRUFxMkE3aFJHbWRubTl0VURiTzlJRFN3Qks2VGJRYStQWFlQQ1B5NnJiVHJUdHc3UEhrY2NLcnBwMHlWaHA1SGRFSWNLcjZwTGxWREJmT0xYOVFVc3lDT1Ywd3pmaklKTmxHRVlzZGxMSml6SGhibjJtVWp2U0FIUXFaRVRZUDgxZUZ6TFFOblBIdDRFVlZVaDdWZkRFU1U4NEtlem1ENVFsV3BYTG12VTMxL3lNZitTZTh4aEhUdktTQ1pJRkltV3dvRzZtYlVvV2Y5bnpwSW9hU2pCK3dlcXFVVW1wYWFhc1hWYWw3MkorVVgyQisyUlBXM1JjVDBlT3pRZ3FsSkwzUktyVEp2ZHNqRTNKRUF2R3EzbEdIU1pYeTI4RzNza3VhMlNtVmkvdzR5Q0U2Z2JPRHFuVFdsZzcrd0M2MDR5ZEdYQThWSmlTNWFwNDNKWGlVRkZBYVE9PQo= | |
--- | |
apiVersion: v1 | |
kind: ServiceAccount | |
metadata: | |
name: robot-git-ssh | |
secrets: | |
- name: git-ssh | |
--- | |
apiVersion: tekton.dev/v1beta1 | |
kind: TaskRun | |
metadata: | |
name: git-ssh-creds | |
spec: | |
serviceAccountName: robot-git-ssh | |
resources: | |
inputs: | |
- name: gitssh | |
resourceSpec: | |
type: git | |
params: | |
- name: revision | |
value: master | |
- name: url | |
value: [email protected]:praveen4g0/pipeline.git | |
taskSpec: | |
resources: | |
inputs: | |
- name: gitssh | |
type: git | |
steps: | |
- name: config | |
image: alpine/git:latest | |
script: | | |
cd /workspace/gitssh | |
git config user.email "[email protected]" | |
git config user.name "praveen4g0" | |
# ls -lrt | |
# cat ~/.ssh/config | |
cat ~/.ssh/id_git-ssh | |
git checkout master | |
git remote -v | |
git commit -m "empty-commit" --allow-empty && git push origin master |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment