This document lists all secrets required for the CI/CD pipelines to function properly.
Configure these secrets in your GitHub repository: Settings > Secrets and variables > Actions > New repository secret
| Secret Name | Description | Where to Get | Used By |
|---|---|---|---|
GITLAB_SSH_PRIVATE_KEY |
SSH private key for GitLab push mirroring | Generate with ssh-keygen -t ed25519 -C "github-mirror" |
.github/workflows/ci.yml (mirror job) |
GITLAB_MIRROR_URL |
GitLab repository URL for mirroring | git@gitlab.com:overarch-underpin/managers/universal-project-manager.git |
.github/workflows/ci.yml (mirror job) |
| Secret Name | Description | Where to Get | Used By |
|---|---|---|---|
CODECOV_TOKEN |
Token for uploading coverage reports | codecov.io - Get from repo settings | .github/workflows/ci.yml (test job) |
SNYK_TOKEN |
Token for Snyk security scanning | snyk.io - Account settings | Security scanning workflows |
SONAR_TOKEN |
Token for SonarCloud analysis | sonarcloud.io - Security tab | Code quality workflows |
| Secret Name | Description | Availability |
|---|---|---|
GITHUB_TOKEN |
Automatic GitHub token | Automatically available in all workflows |
Configure these variables in your GitLab project: Settings > CI/CD > Variables > Add variable
| Variable Name | Description | Where to Get | Protected | Masked |
|---|---|---|---|---|
CI_REGISTRY_USER |
GitLab registry username | Your GitLab username | No | No |
CI_REGISTRY_PASSWORD |
GitLab registry password or token | GitLab Personal Access Token with read_registry, write_registry |
Yes | Yes |
| Variable Name | Description | Where to Get | Protected | Masked |
|---|---|---|---|---|
GITHUB_MIRROR_URL |
GitHub repository URL (if reverse mirroring) | git@github.com:hyperpolymath/Universal-Project-Manager.git |
No | No |
GITHUB_SSH_PRIVATE_KEY |
SSH key for GitHub push | Generate with ssh-keygen |
Yes | Yes |
GitLab provides many predefined CI/CD variables automatically. Key ones include:
CI_COMMIT_REF_SLUG- Slug of the branch or tagCI_COMMIT_SHA- Full commit SHACI_DEFAULT_BRANCH- Default branch nameCI_PROJECT_PATH- Project path with namespaceCI_REGISTRY- GitLab Container Registry URLCI_REGISTRY_IMAGE- Registry image path
# Generate a new ED25519 SSH key pair
ssh-keygen -t ed25519 -C "github-to-gitlab-mirror" -f gitlab_mirror_key -N ""
# The private key (add to GitHub secrets as GITLAB_SSH_PRIVATE_KEY):
cat gitlab_mirror_key
# The public key (add to GitLab as a deploy key with write access):
cat gitlab_mirror_key.pub- Go to your GitLab project: Settings > Repository > Deploy keys
- Click Add deploy key
- Title:
GitHub Mirror - Key: Paste the public key from
gitlab_mirror_key.pub - Enable "Grant write permissions to this key"
- Click Add key
- Go to your GitHub repository: Settings > Secrets and variables > Actions
- Click New repository secret
- Name:
GITLAB_SSH_PRIVATE_KEY - Secret: Paste the entire contents of
gitlab_mirror_key(including BEGIN/END lines) - Click Add secret
- In the same GitHub Secrets page, click New repository secret
- Name:
GITLAB_MIRROR_URL - Secret:
git@gitlab.com:overarch-underpin/managers/universal-project-manager.git - Click Add secret
- Go to codecov.io and sign in with GitHub
- Add your repository
- Copy the upload token from the repository settings
- Add to GitHub Secrets as
CODECOV_TOKEN
- Use protected variables for production secrets
- Use masked variables for sensitive values
- Rotate keys periodically (recommended: every 90 days)
- Use environment-specific secrets when possible
- Audit secret access regularly
- Never commit secrets to the repository
- Never log secret values in CI output
- Never share secrets between unrelated projects
- Never use personal access tokens for CI (use deploy keys/tokens)
- Never disable masking for sensitive values
# From your local machine, verify the connection works
ssh -T git@gitlab.com -i ~/.ssh/gitlab_mirror_keyExpected output: Welcome to GitLab, @username!
- Push a small change to trigger the CI
- Check the Actions tab for workflow runs
- Verify the mirror job succeeds
- Check GitLab to confirm the push arrived
- Verify the deploy key has write permissions on GitLab
- Check the SSH key format (should include BEGIN/END lines)
- Ensure the key isn't password-protected
- Verify the token is correct
- Check if the repository is properly activated on codecov.io
- Ensure coverage files are being generated
- Use a Personal Access Token, not your password
- Token needs
read_registryandwrite_registryscopes - Variable should be masked and protected
For issues with secret configuration:
- GitHub: Open an issue in this repository
- GitLab: Contact the project maintainers