kubesphere-devops-credentials
Use when managing credentials in KubeSphere DevOps, including repository credentials, kubeconfig, and API tokens
Install / Use
npx skills add kubesphere/kubesphere --skill kubesphere-devops-credentialsInstalls into whichever agent you are using.
SKILL.md
Installable skill definition
Quality Score
Category
AutomationSupported Platforms
Our assessment of kubesphere-devops-credentials
kubesphere-devops-credentials scores 95/100 on our quality scale, 173rd of 1,333 Automation skills we index (top 13%).
Its SKILL.md is 16 KB long, well organised into 42 sections with 18 code examples: a thorough specification that gives an agent plenty to work with.
With 17,059 GitHub stars, it is one of the more widely adopted skills in the catalogue.
Maintenance, license and trust
- The repository was last updated about 2 months ago, so kubesphere-devops-credentials is actively maintained.
- No license is declared. By default that means all rights are reserved: you can read it, but reusing or redistributing it is not clearly permitted. Ask the author before building on it commercially.
- Its trust signals score 88/100, with 1 caution from licensing, adoption, age or documentation. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.
kubesphere-devops-credentials compared with similar skills
All 4 of these similar skills score higher than kubesphere-devops-credentials; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| kubesphere-devops-credentials (this skill)by kubesphere | 95 | 17.1k | 2mo ago | SKILL.md |
| Agent-Reachby Panniantong | 100 | 85.5k | 10d ago | CLAUDE.md |
| headroomby headroomlabs-ai | 100 | 73.8k | today | CLAUDE.md |
| rufloby ruvnet | 100 | 73.3k | 1d ago | CLAUDE.md |
| Scraplingby D4Vinci | 100 | 83.8k | today | MCP Server |
Frequently asked questions
- How do I install kubesphere-devops-credentials?
- Run
npx skills add kubesphere/kubesphere --skill kubesphere-devops-credentials. The install tabs above show the steps for each supported agent. - Which AI agents does kubesphere-devops-credentials work with?
- It is written for Universal, as a SKILL.md file. Other agents that read the same format can often use it too.
- Is kubesphere-devops-credentials safe to use?
- It declares no license and scores 88/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is kubesphere-devops-credentials still maintained?
- The repository was last updated about 2 months ago, so kubesphere-devops-credentials is actively maintained.
Skill content
View source on GitHubname: kubesphere-devops-credentials description: Use when managing credentials in KubeSphere DevOps, including repository credentials, kubeconfig, and API tokens
KubeSphere DevOps Credentials
Overview
Credentials in KubeSphere DevOps are Kubernetes Secrets with specific labels and annotations. They are synced to Jenkins for use in pipelines. Supported types include SSH keys, username/password, and secret tokens.
When to Use
- Creating credentials for Git repositories
- Setting up deployment credentials (kubeconfig, registry)
- Managing API tokens for external services
- Troubleshooting credential access issues
- Migrating credentials between DevOps projects
Credential Types
| Type | Use Case | Secret Key |
|------|----------|------------|
| SSH | Git repositories | username, privatekey |
| Basic | Username/password | username, password |
| Secret | API tokens, secrets | secret |
| Kubeconfig | Kubernetes clusters | kubeconfig (v1.1.x only) |
| SSH Username/Pass | Git with user/pass | username, password |
| String | Generic text/tokens | secret |
Resource Structure
Credentials are stored as Kubernetes Secrets with DevOps labels:
apiVersion: v1
kind: Secret
metadata:
name: my-credential
namespace: project-xxx # DevOps project namespace
labels:
devops.kubesphere.io/credential: "true"
annotations:
credential.devops.kubesphere.io/syncstatus: successful
credential.devops.kubesphere.io/type: ssh|basic-auth|secret-text
stringData:
username: git-user
privatekey: |
-----BEGIN OPENSSH PRIVATE KEY-----
...
-----END OPENSSH PRIVATE KEY-----
type: credential.devops.kubesphere.io/ssh # CRITICAL: Must use credential.devops.kubesphere.io/* type, NOT Opaque!
⚠️ CRITICAL: Secret Type Must Be credential.devops.kubesphere.io/*
The type field must be one of:
credential.devops.kubesphere.io/basic-authcredential.devops.kubesphere.io/ssh-authcredential.devops.kubesphere.io/secret-textcredential.devops.kubesphere.io/kubeconfig
Using type: Opaque will result in:
- Credential sync status stuck at "pending"
- Jenkins cannot find the credential
- Pipeline builds fail with "CredentialId could not be found"
Controller Logic: The credential controller only watches secrets with types starting with credential.devops.kubesphere.io/ (see devopscredential_controller.go line 102). Secrets with type: Opaque are completely ignored.
API Endpoints
| Operation | Method | Endpoint |
|-----------|--------|----------|
| List Credentials | GET | /kapis/devops.kubesphere.io/v1alpha3/namespaces/{devops}/credentials |
| Create Credential | POST | /kapis/devops.kubesphere.io/v1alpha3/namespaces/{devops}/credentials |
| Get Credential | GET | /kapis/devops.kubesphere.io/v1alpha3/namespaces/{devops}/credentials/{credential} |
| Update Credential | PUT | /kapis/devops.kubesphere.io/v1alpha3/namespaces/{devops}/credentials/{credential} |
| Delete Credential | DELETE | /kapis/devops.kubesphere.io/v1alpha3/namespaces/{devops}/credentials/{credential} |
| Get Usage | GET | /kapis/devops.kubesphere.io/v1alpha2/namespaces/{devops}/credentials/{credential}/usage |
Common Operations
List Credentials
curl "https://kubesphere-api/kapis/devops.kubesphere.io/v1alpha3/namespaces/{devops}/credentials" \
-H "Authorization: Bearer $TOKEN"
Create SSH Credential
curl -X POST "https://kubesphere-api/kapis/devops.kubesphere.io/v1alpha3/namespaces/{devops}/credentials" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"apiVersion": "v1",
"kind": "Secret",
"metadata": {
"name": "github-ssh-key",
"annotations": {
"credential.devops.kubesphere.io/type": "ssh"
}
},
"stringData": {
"username": "git",
"privatekey": "-----BEGIN OPENSSH PRIVATE KEY-----\n...\n-----END OPENSSH PRIVATE KEY-----"
},
"type": "credential.devops.kubesphere.io/ssh-auth"
}'
Create Basic Auth Credential
curl -X POST "https://kubesphere-api/kapis/devops.kubesphere.io/v1alpha3/namespaces/{devops}/credentials" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"apiVersion": "v1",
"kind": "Secret",
"metadata": {
"name": "docker-registry",
"annotations": {
"credential.devops.kubesphere.io/type": "basic-auth"
}
},
"stringData": {
"username": "docker-user",
"password": "docker-password"
},
"type": "credential.devops.kubesphere.io/basic-auth"
}'
Create Basic Auth for Git Access Token (GitHub/GitLab)
Best Practice: Use basic-auth type for Git access tokens:
# For GitHub/GitLab access tokens
curl -X POST "https://kubesphere-api/kapis/devops.kubesphere.io/v1alpha3/namespaces/{devops}/credentials" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"apiVersion": "v1",
"kind": "Secret",
"metadata": {
"name": "github-token",
"annotations": {
"credential.devops.kubesphere.io/type": "basic-auth"
}
},
"stringData": {
"username": "git", # Can be any value for token auth
"password": "ghp_xxxxxxxxxx" # Your GitHub/GitLab access token
},
"type": "credential.devops.kubesphere.io/basic-auth"
}'
Why basic-auth for tokens?
- Git access tokens are used like passwords in HTTPS Git URLs
- ArgoCD and Jenkins both support basic-auth for Git authentication
- Username can be any value (often 'git' or your username)
- Password field holds the actual token
Supported Git Providers:
- GitHub Personal Access Token:
ghp_xxxxxxxxxxxx - GitLab Personal Access Token:
glpat-xxxxxxxxxx - Bitbucket App Password
- Gitea/Forgejo Access Token
Create Secret Text Credential
curl -X POST "https://kubesphere-api/kapis/devops.kubesphere.io/v1alpha3/namespaces/{devops}/credentials" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"apiVersion": "v1",
"kind": "Secret",
"metadata": {
"name": "api-token",
"annotations": {
"credential.devops.kubesphere.io/type": "secret-text"
}
},
"stringData": {
"secret": "my-a…[redacted]"
},
"type": "credential.devops.kubesphere.io/secret-text"
}'
Using Credentials in Pipelines
SSH Key for Git Checkout
pipeline {
agent any
stages {
stage('Checkout') {
steps {
git credentialsId: 'github-ssh-key', url: 'git@github.com:org/repo.git'
}
}
}
}
WithCredentials Step
pipeline {
agent any
stages {
stage('Deploy') {
steps {
withCredentials([
usernamePassword(
credentialsId: 'docker-registry',
usernameVariable: 'DOCKER_USER',
passwordVariable: 'DOCKER_PASS'
)
]) {
sh 'echo $DOCKER_PASS | docker login -u $DOCKER_USER --password-stdin'
}
}
}
}
}
Kubeconfig (v1.2.x+ with string type)
pipeline {
agent any
stages {
stage('Deploy to K8s') {
steps {
withCredentials([string(credentialsId: 'my-kubeconfig', variable: 'KUBECONFIG_DATA')]) {
sh '''
printf "%s" "$KUBECONFIG_DATA" > kubeconfig
kubectl --kubeconfig=kubeconfig apply -f deployment.yaml
'''
}
}
}
}
}
GitRepository Resource
GitRepository connects a Git repository with a credential for use in pipelines and ArgoCD applications.
GitRepository Structure
apiVersion: devops.kubesphere.io/v1alpha3
kind: GitRepository
metadata:
name: my-repo
namespace: demo-project
spec:
url: https://github.com/example/repo.git
provider: github # Git provider: github, gitlab, bitbucket, etc.
secret: # Reference to credential secret
name: github-token
namespace: demo-project
description: "Main application repository"
Required Fields:
spec.url: Repository URLspec.provider: Git provider type (github,gitlab,bitbucket,gitea, etc.)spec.secret.name: Name of the credential secretspec.secret.namespace: Namespace of the credential secret
Create GitRepository
Via API:
curl -X POST "https://kubesphere-api/kapis/devops.kubesphere.io/v1alpha3/namespaces/{devops}/gitrepositories" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"apiVersion": "devops.kubesphere.io/v1alpha3",
"kind": "GitRepository",
"metadata": {
"name": "demo-jenkinsfiles",
"namespace": "demo-project"
},
"spec": {
"url": "https://github.com/stoneshi-yunify/argocd-example-apps.git",
"provider": "github",
"secret": {
"name": "github-token",
"namespace": "demo-project"
},
"description": "Demo repository with examples"
}
}'
Via kubectl:
cat <<EOF | kubectl apply -f -
apiVersion: devops.kubesphere.io/v1alpha3
kind: GitRepository
metadata:
name: my-application-repo
namespace: demo-project
spec:
url: https://github.com/example/my-app.git
provider: github
secret:
name: github-token
namespace: demo-project
description: "Application source code"
EOF
List GitRepositories
# Via API
curl "https://kubesphere-api/kapis/devops.kubesphere.io/v1alpha3/namespaces/{devops}/gitrepositories" \
-H "Authorization: Bearer $TOKEN" | jq '.items[].metadata.name'
# Via kubectl
kubectl get gitrepositories -n demo-project
Credential + GitRepository Usage Patterns
Pattern 1: Multi-Branch Pipeline with GitRepository
Complete workflow for private Git repository:
# Step 1: Create credential for Git access
apiVersion: v1
kind: Secret
metadata:
name: github-token
namespace: demo-project
annotations:
credential.devops.kubesphere.io/type: basic-auth
stringData:
username: "git"
password: "ghp_…[redacted]"
type: credential.devops.kubesphere.io/basic-auth
---
# Step 2: Create GitRepository linking repo + credential
apiVersion: devops.kubesphere.io/v1alpha3
kind: GitRepository
metadata:
name: my-app-repo
namespace: demo-project
spec:
url: https://github.com/org/my-app.git
provider: github
secret:
name: github-token
namespace: demo-project
description: "Application source code"
---
# Step 3: Create multi-branch pipeline using GitRepository
apiVersion: devops.kubesphere.io/v1alpha3
kind: Pipeline
metadata:
name: my-multibranch-pipeline
namespace: demo-project
spec:
type: multi-branch-pipeline
multi_branch_pipeline:
name: my-multibranch-pipeline
source_type: git
git_source:
url: https://github.com/org/my-app.git
credential_id: github-token # Reference credential directly
discover_branches: true
script_path: Jenkinsfile
Pattern 2: ArgoCD Application with GitRepository
# Step 1: Create credential (basic-auth for token)
apiVersion: v1
kind: Secret
metadata:
name: github-token
namespace: demo-project
annotations:
credential.devops.kubesphere.io/type: basic-auth
stringData:
username: "git"
password: "ghp_…[redacted]"
---
# Step 2: Create GitRepository
apiVersion: devops.kubesphere.io/v1alpha3
kind: GitRepository
metadata:
name: argo-manifests
namespace: demo-project
spec:
url: https://github.com/org/k8s-manifests.git
credentialId: github-token
---
# Step 3: Create ArgoCD Application referencing the repository
apiVersion: gitops.kubesphere.io/v1alpha1
kind: Application
metadata:
name: my-app
namespace: demo-project
spec:
argoApp:
spec:
source:
repoURL: https://github.com/org/k8s-manifests.git
targetRevision: HEAD
path: overlays/production
destination:
Truncated for display — read the full file on GitHub.
Related Skills
Agent-Reach
85.5kGive your AI agent eyes to see the entire internet. Read & search Twitter, Reddit, YouTube, GitHub, Bilibili, XiaoHongShu — one CLI, zero API fees.
headroom
73.8kCompress tool outputs, logs, files, and RAG chunks before they reach the LLM. 20% fewer tokens for coding agents, 60-95% fewer tokens for JSON, same answers. Library, proxy, MCP server.
ruflo
73.3k🌊 The original agent harness. Deploy intelligent multi-player swarms, coordinate autonomous workflows, and build conversational AI systems. Features adaptive memory, self-learning intelligence, federation, vector RAG integration, and native Claude Code / Codex / Hermes and many more Integrated
Scrapling
83.8k🕷️ An adaptive Web Scraping framework that handles everything from a single request to a full-scale crawl! Don't be shy, join here: https://discord.gg/EMgGbDceNQ and follow here for daily tips and tricks: https://x.com/Scrapling_dev
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
