tkn pac repository
Manage Pipelines-as-Code Repository custom resources with list and delete operations.Available Commands
list
List Pipelines-as-Code repositories and their latest PipelineRun status.Synopsis
Description
Thelist command displays all Repository CRDs and their current or last PipelineRun status. It shows:
- Repository name and URL
- Latest commit SHA
- Start time and duration
- PipelineRun status
- Clickable links to logs/console (in modern terminals)
Usage Examples
Flags
List repositories across all namespaces
Namespace scope for the request
Label selector to filter repositories (supports
=, ==, !=)Examples:app=myappenvironment=production,tier=backendteam!=external
Display timestamps as RFC3339 instead of relative time
Don’t print column headers
Output Example
--all-namespaces:
--use-realtime:
Column Descriptions
| Column | Description |
|---|---|
| NAME | Repository CRD name |
| URL | Git repository URL |
| SHA | Latest commit SHA (first 7 characters) |
| STARTED | When the PipelineRun started (relative or absolute) |
| DURATION | How long the PipelineRun ran/is running |
| NAMESPACE | Namespace (only with -A) |
| STATUS | PipelineRun status (Succeeded, Failed, Running, etc.) |
Status Values
| Status | Description |
|---|---|
| Succeeded | PipelineRun completed successfully |
| Failed | PipelineRun failed |
| Running | PipelineRun currently executing |
| Pending | PipelineRun waiting to start |
| NoRun | No PipelineRuns found for this repository |
Clickable Links
On modern terminals (iTerm2, Windows Terminal, GNOME Terminal, kitty, etc.), the SHA and STATUS columns contain clickable links:- SHA link: Opens commit in Git provider
- STATUS link: Opens PipelineRun logs in console/dashboard
Label Selector Examples
Troubleshooting
No repositories found:- Check you’re in the correct namespace:
kubectl config get-contexts - Try listing all namespaces:
tkn pac list -A - Verify repositories exist:
kubectl get repositories
delete
Delete one or more Pipelines-as-Code Repository CRDs.Synopsis
Description
Thedelete repository command removes Repository CRDs from your cluster. With the --cascade flag, it also deletes associated secrets (webhook and provider tokens).
Usage Examples
Required Arguments
Repository name(s) to delete (space-separated for multiple)
Flags
Delete the repository and its attached secretsDeletes:
- Git provider token secret (if configured)
- Webhook secret (if configured)
Namespace containing the repository
Output Example
Without cascade:Cascade Deletion Details
When using--cascade, the command deletes:
- Git Provider Secret - Contains personal access token or API key
- Webhook Secret - Contains webhook validation secret
- Repository CRD - The Repository custom resource itself
Associated Secrets
Secrets deleted with--cascade (if they exist):
Common Workflows
Clean Up Test Repositories
Remove Repository but Keep Secrets
Delete from Multiple Namespaces
Troubleshooting
Repository not found:- Check the repository name:
tkn pac list - Verify the namespace:
tkn pac list -A - Ensure correct spelling
- Already deleted
- Never created
- Shared by another repository
Related Commands
tkn pac create repo- Create new repositoriestkn pac describe- Describe repository detailstkn pac logs- View PipelineRun logs