# Kubesphere Devops Credentials

Use when managing credentials in KubeSphere DevOps, including repository credentials...

- Repository: https://github.com/kubesphere/kubesphere (17074 stars)
- Category: DevOps
- License: see repository
- Last updated: 2026-07-15
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add kubesphere/kubesphere --skill kubesphere-devops-credentials -g -a claude-code -y`
Codex: `npx skills add kubesphere/kubesphere --skill kubesphere-devops-credentials -g -a codex -y`
Cursor: `npx skills add kubesphere/kubesphere --skill kubesphere-devops-credentials -g -a cursor -y`
Gemini CLI: `npx skills add kubesphere/kubesphere --skill kubesphere-devops-credentials -g -a gemini-cli -y`

## Description

Use when managing credentials in KubeSphere DevOps, including repository credentials, kubeconfig, and API tokens

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# 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:

```yaml
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-auth`
- `credential.devops.kubesphere.io/ssh-auth`
- `credential.devops.kubesphere.io/secret-text`
- `credential.devops.kubesphere.io/kubeconfig`

The rest: https://github.com/kubesphere/kubesphere/blob/HEAD/skills/kubesphere-devops-credentials/SKILL.md
