Credentials Management
Secure credential storage and management
Repository Credentials Guide
Overview
The application now supports cloning private repositories by providing credentials through the UI, eliminating the need for terminal password prompts.
How to Use
Dashboard Interface
- Navigate to the Dashboard → Operations tab
- In the "Clone Repository" section, enter your repository URL
- Enable "Private Repository (requires authentication)" toggle
- Enter your credentials:
- Username: Your GitLab/GitHub username
- Password/Token: Your personal access token (recommended) or password
Credential Requirements
GitLab
- Username: Your GitLab username
- Token: Personal Access Token with
read_repositoryscope- Create at: GitLab → Settings → Access Tokens
- Token format:
glpat-xxxxxxxxxxxxxxxxxxxx
GitHub
- Username: Your GitHub username
- Token: Personal Access Token with
reposcope- Create at: GitHub → Settings → Developer settings → Personal access tokens
- Token format:
ghp_xxxxxxxxxxxxxxxxxxxx
Other Git Providers
- Use your platform's username and personal access token/app password
Security Notes
⚠️ Important Security Considerations:
- Use Personal Access Tokens: Always prefer personal access tokens over passwords
- Minimal Permissions: Grant only the minimum required permissions (read access)
- Token Expiry: Set reasonable expiration dates for tokens
- No Storage: Credentials are only used during the clone operation and are not stored
- HTTPS Only: Only HTTPS repository URLs support credential authentication
Example Usage
Repository URL: https://gitlab.com/mycompany/private-repo.git Username: john.doe Token: glpat-1234567890abcdef1234
Troubleshooting
Common Issues
-
"Authentication failed"
- Verify your username and token are correct
- Ensure the token has proper permissions
- Check if the token has expired
-
"Repository not found"
- Verify the repository URL is correct
- Ensure you have access to the repository
- Check if the repository is private and requires authentication
-
"Invalid URL"
- Use HTTPS URLs only (not SSH)
- Ensure the URL format is correct
-
Claude Code headless calls failing completely
- This can occur when GitLab API keys for the Claude Code MCP server are incorrect or expired
- Symptoms: Claude CLI commands hang, timeout, or fail with cryptic errors
- Solution: Verify your GitLab API key configuration in the Claude Code MCP server settings
- The Claude Code MCP server requires a valid GitLab API key even for basic operations
Claude Code MCP Server Issues
If you're experiencing issues with Claude CLI headless execution (commands hanging, timeouts, or failing to respond), the problem may be related to Claude Code MCP server configuration:
Symptoms:
claude --versionworks fineclaude -p "question"hangs indefinitely or fails- Headless Claude calls timeout without clear error messages
- Claude CLI appears to connect but never returns responses
Root Cause: The Claude Code MCP server may be configured with an invalid or expired GitLab API key, causing all headless operations to fail silently.
Recommended Solution (Current Project State): 🚨 IMPORTANT: For this project, it is recommended to NOT use the GitLab MCP server at all.
The current implementation handles all git operations manually:
- Before Claude Code: Application prepares git workspace, branches, and context
- After Claude Code (edit requests with
createMR: true): Application handles change detection, commit, push, and optional merge request creation as part of the same queue job.
Why avoid GitLab MCP server:
- Prevents API key configuration issues entirely
- Eliminates silent failures in headless operations
- Application's manual git handling provides better control and error handling
- Reduces complexity and potential points of failure
Alternative Solutions (if MCP server is needed):
- Check your Claude Code MCP server configuration
- Verify the GitLab API key is valid and has proper permissions
- Update the API key if it has been rotated or expired
- Restart the Claude Code MCP server after updating credentials
Prevention:
- Recommended: Configure Claude Code without GitLab MCP server integration
- If using MCP server: Monitor GitLab API key expiration dates
- Use tokens with appropriate long-term validity
- Set up monitoring/alerts for API key expiration
- Test Claude CLI functionality after any credential changes
Best Practices
- Test with a simple public repository first
- Use tokens with minimal required permissions
- Keep tokens secure and rotate them regularly
- Use repository-specific deploy keys when possible for production environments
- Test Claude CLI functionality after any API key changes