Skip to content

Fix tag_version job: switch from HTTPS to SSH authentication - #844

Merged
ricardobernardino2024 merged 1 commit into
release-17.0.0from
chunk/fix-tag-version-ssh-auth
Sep 2, 2026
Merged

Fix tag_version job: switch from HTTPS to SSH authentication#844
ricardobernardino2024 merged 1 commit into
release-17.0.0from
chunk/fix-tag-version-ssh-auth

Conversation

@circleci-app

@circleci-app circleci-app Bot commented Sep 2, 2026

Copy link
Copy Markdown

Summary

  • Job 31212 (tag_version) failed with: remote: Invalid username or token. Password authentication is not supported for Git operations.
  • The codacy/tag_version orb job pushes git tags over HTTPS using PROVIDER_TOKEN as a credential, which GitHub now rejects for git push operations.
  • Replaced both codacy/tag_version orb calls in the release_pipeline workflow with a new custom tag_version_ssh job that uses the SSH deploy key (fingerprint df:83:d7:c7:d5:79:06:c2:3b:d1:fd:e2:a3:d1:12:c5) already configured in the project.

Note: The SSH key associated with that fingerprint must have write access to the codacy/chart repository. If it is currently read-only (e.g. the same key used for build_docs), a new SSH deploy key with write access must be added to both the CircleCI project settings and the GitHub repo's Deploy Keys, and the fingerprint updated in the new job.

https://app.circleci.com/agents/gh/codacy/chat/46410d71-f290-44c1-bbfe-7883ad739c3e

The codacy/tag_version orb job was failing with:
  "Invalid username or token. Password authentication is not supported for Git operations."

GitHub no longer accepts token-based HTTPS push for git operations.
Replace both codacy/tag_version orb calls in the release_pipeline workflow
with a custom tag_version_ssh job that uses SSH key authentication,
bypassing the HTTPS credential issue entirely.

AI-Generated: true
@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

AI Reviewer: first review requested successfully. AI can make mistakes. Always validate suggestions.

Run reviewer

TIP This summary will be updated as you push new changes.

@codacy-production codacy-production Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

The pull request effectively replaces the deprecated HTTPS authentication method with a custom SSH-based tagging job. Codacy analysis indicates the changes are up to standards with no new quality issues. However, the configuration relies on a hardcoded repository URL, which limits portability and should be replaced with dynamic environment variables. Additionally, while the implementation aligns with acceptance criteria, there are no test cases confirming the logic for version fallback or the force-push parameter.

Test suggestions

  • Verify tagging using version read from .version file when no parameter is provided\n- [ ] Verify tagging using explicit version parameter (e.g., 'latest')\n- [ ] Verify force push behavior when the force parameter is set to true
Prompt proposal for missing tests
Consider implementing these tests if applicable:
1. Verify tagging using version read from .version file when no parameter is provided\n- [ ] Verify tagging using explicit version parameter (e.g., 'latest')\n- [ ] Verify force push behavior when the force parameter is set to true

TIP Improve review quality by adding custom instructions
TIP How was this review? Give us feedback

Comment thread .circleci/config.yml
command: |
git config --global user.email "circleci@codacy.com"
git config --global user.name "CircleCI"
git remote set-url origin git@github.com:codacy/chart.git

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 MEDIUM RISK

Suggestion: Avoid hardcoding the repository URL. Use CircleCI environment variables to construct the SSH URL dynamically.\n\nsuggestion\n git remote set-url origin "git@github.com:${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME}.git"\n

Comment thread .circleci/config.yml
- "df:83:d7:c7:d5:79:06:c2:3b:d1:fd:e2:a3:d1:12:c5"
- run:
name: Setup SSH
command: ssh-keyscan github.com >> ~/.ssh/known_hosts

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚪ LOW RISK

Nitpick: Ensure the '~/.ssh' directory exists and use the '-H' flag for 'ssh-keyscan' to improve security and robustness.\n\nsuggestion\n command: mkdir -p ~/.ssh && ssh-keyscan -H github.com >> ~/.ssh/known_hosts\n

@ricardobernardino2024
ricardobernardino2024 merged commit 4cc6583 into release-17.0.0 Sep 2, 2026
11 checks passed
@ricardobernardino2024
ricardobernardino2024 deleted the chunk/fix-tag-version-ssh-auth branch September 2, 2026 14:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant