Skip to content

Instantly share code, notes, and snippets.

@beatngu13
Created July 29, 2023 15:50
Show Gist options
  • Save beatngu13/26d2818a4cdce88588fe76c2506d507f to your computer and use it in GitHub Desktop.
Save beatngu13/26d2818a4cdce88588fe76c2506d507f to your computer and use it in GitHub Desktop.
GitHub (fine-grained or classic) access token as K8s secret for Tekton
kind: Secret
apiVersion: v1
metadata:
name: my-github-token
namespace: my-namespace
annotations:
tekton.dev/git-0: 'https://github.com'
# stringData is important; if you use data instead, you might get the following error:
# Secret in version "v1" cannot be handled as a Secret: illegal base64 data at input byte 6
stringData:
password: ''
username: 'github_pat_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
type: kubernetes.io/basic-auth
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment