Skip to content

Comments

fix: [AAP-65460] handle ssh:// and git+ssh:// URLs in project sync#1484

Open
hsong-rh wants to merge 1 commit intoansible:mainfrom
hsong-rh:aap-65460
Open

fix: [AAP-65460] handle ssh:// and git+ssh:// URLs in project sync#1484
hsong-rh wants to merge 1 commit intoansible:mainfrom
hsong-rh:aap-65460

Conversation

@hsong-rh
Copy link
Contributor

@hsong-rh hsong-rh commented Feb 19, 2026

https://issues.redhat.com/browse/AAP-65460

Summary

  • build_url() only recognized git@host:path shorthand as SSH URLs
  • URLs with ssh:// or git+ssh:// schemes (common for Gitea and self-hosted VCS with non-standard ports) fell through to HTTP credential-embedding logic, corrupting the URL and causing "Permission denied (publickey)" errors
  • Added early return for ssh:// and git+ssh:// scheme URLs to preserve them unchanged, matching existing behavior for git@ shorthand

Test plan

  • Added unit tests for build_url() covering ssh://, git+ssh://, and ssh:// with non-standard ports
  • Added integration-style tests for git_clone() verifying SSH key credential is applied correctly for all SSH URL formats
  • All 28 SCM unit tests pass

Local verification

Verified end-to-end with a local Gitea instance:

  1. Started Gitea container with SSH on non-standard port 2222 (podman run -d --name gitea -p 3000:3000 -p 2222:22 gitea/gitea:latest)
  2. Generated ED25519 SSH keypair, added public key to Gitea
  3. Created EDA Source Control credential with the private key
  4. Created EDA project with URL ssh://git@<host>:2222/admin/test-rulebook.git and assigned the credential
  5. Project sync completed successfully — SSH URL preserved unchanged, credential applied correctly

🤖 Generated with Claude Code

build_url() only recognized git@host:path shorthand as SSH URLs.
URLs with ssh:// or git+ssh:// schemes (common for Gitea and
self-hosted VCS with non-standard ports) fell through to HTTP
credential-embedding logic, corrupting the URL and causing
"Permission denied (publickey)" errors.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@hsong-rh hsong-rh requested a review from a team as a code owner February 19, 2026 19:34
@hsong-rh
Copy link
Contributor Author

/run-e2e

@sonarqubecloud
Copy link

@codecov-commenter
Copy link

codecov-commenter commented Feb 19, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.51%. Comparing base (1d7e5b2) to head (9926ca1).

@@            Coverage Diff             @@
##             main    #1484      +/-   ##
==========================================
+ Coverage   91.44%   91.51%   +0.06%     
==========================================
  Files         235      235              
  Lines       10135    10135              
==========================================
+ Hits         9268     9275       +7     
+ Misses        867      860       -7     
Flag Coverage Δ
unit-int-tests-3.11 91.51% <100.00%> (+0.06%) ⬆️
unit-int-tests-3.12 91.51% <100.00%> (+0.06%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/aap_eda/services/project/scm.py 74.59% <100.00%> (+3.78%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@hsong-rh
Copy link
Contributor Author

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.

4 participants