Credential Types
Registry Credentials
Authenticate with Helm chart registries (HTTP and OCI).
Git Credentials
Connect to GitHub, GitLab, and other Git providers.
Registry Credentials
Registry credentials authenticate with Helm chart repositories. They’re used when syncing charts from private registries.Creating a Registry Credential
1
Navigate to Credentials
Go to Credentials in the Ankra dashboard.
2
Add Credential
Click Add and select Registry as the provider type.
3
Enter Details
- Name: A unique identifier (e.g.,
ghcr-auth,harbor-prod) - Username: Your registry username
- Password: Your registry password or access token
4
Save
Click Create to securely store the credential.
Provider-Specific Setup
GitHub Container Registry (GHCR)
GitHub Container Registry (GHCR)
Create a Personal Access Token:
- Go to GitHub → Settings → Developer settings → Personal access tokens
- Generate a token with
read:packagesscope - For pushing charts, also add
write:packages
- Username: Your GitHub username
- Password: The Personal Access Token
Google Artifact Registry
Google Artifact Registry
Create a Service Account:
- Go to Google Cloud Console → IAM → Service Accounts
- Create a new service account
- Grant “Artifact Registry Reader” role
- Create and download a JSON key
- Username:
_json_key - Password: The entire JSON key file contents
Amazon ECR
Amazon ECR
Get an auth token:Credential values:
- Username:
AWS - Password: The token from the command above
Azure Container Registry
Azure Container Registry
Create a Service Principal:Credential values:
- Username: The
appIdfrom the output - Password: The
passwordfrom the output
Docker Hub
Docker Hub
Create an Access Token:
- Go to Docker Hub → Account Settings → Security
- Create a new Access Token with Read permissions
- Username: Your Docker Hub username
- Password: The Access Token (not your password)
Harbor
Harbor
Use a robot account (recommended):
- Go to your Harbor project → Robot Accounts
- Create a new robot account with pull permissions
- Username:
robot$project+name(the robot account name) - Password: The robot account secret
JFrog Artifactory
JFrog Artifactory
Create an API Key or Access Token:
- Go to User Profile → Edit Profile
- Generate an API Key or create an Access Token
- Username: Your Artifactory username
- Password: The API Key or Access Token
Using Credentials
With Helm Registries
When adding a registry, select the credential to use for authentication:- Go to Charts → Repositories → Add
- Enter the registry URL
- Select the credential from the dropdown
- Click Add
With GitOps
Credentials are automatically used when syncing configurations to GitHub repositories connected via OAuth.Managing Credentials
View Credentials
Go to Credentials to see all stored credentials:- Name and type
- Creation date
- Associated registries (if any)
Update a Credential
- Click on the credential name
- Update the username or password
- Click Save
Updating a credential automatically applies to all registries using it. No need to reconfigure registries.
Delete a Credential
- Go to Credentials
- Click the menu (⋮) next to the credential
- Select Delete
Security
Storage
Credentials are stored securely using HashiCorp Vault:- Encrypted at rest
- Access controlled per organization
- Audit logging for all access
Best Practices
Use Tokens, Not Passwords
Prefer access tokens over account passwords. Tokens can be scoped and revoked independently.
Minimum Permissions
Grant only the permissions needed. For chart sync, read-only access is sufficient.
Rotate Regularly
Rotate credentials periodically, especially for production registries.
Separate by Environment
Use different credentials for dev, staging, and production registries.
Troubleshooting
Authentication Errors
| Error | Cause | Solution |
|---|---|---|
| 401 Unauthorized | Invalid credentials | Verify username and password/token |
| 403 Forbidden | Insufficient permissions | Check the token has required scopes |
| Token expired | Temporary tokens (ECR) | Refresh the token |
| Connection refused | Network issue | Check firewall and network access |
Common Issues
“unauthorized: authentication required”- The credential wasn’t selected when adding the registry
- Edit the registry and select the correct credential
- The token may have been revoked or expired
- Regenerate the token and update the credential
- The token doesn’t have read access to the repository
- Update the token permissions or use a different account