Bug 2036057 - git over ssh doesn't use custom port set in url
Summary: git over ssh doesn't use custom port set in url
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Advanced Cluster Management for Kubernetes
Classification: Red Hat
Component: App Lifecycle
Version: rhacm-2.4
Hardware: All
OS: All
unspecified
medium
Target Milestone: ---
: rhacm-2.4.2
Assignee: Roke Jung
QA Contact: Rafat Islam
bswope@redhat.com
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-12-29 14:48 UTC by Felix Dewaleyne
Modified: 2025-08-08 12:13 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-03-03 06:59:24 UTC
Target Upstream Version:
Embargoed:
bot-tracker-sync: rhacm-2.4.z+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github open-cluster-management backlog issues 18691 0 None None None 2021-12-29 16:56:02 UTC
Red Hat Product Errata RHSA-2022:0735 0 None None None 2022-03-03 07:00:26 UTC

Description Felix Dewaleyne 2021-12-29 14:48:09 UTC
Description of problem:
when pulling an application using git over ssh on a non-22 port the connection is not correctly made.

Version-Release number of selected component (if applicable):
2.4.1

How reproducible:
customer environment

Steps to Reproduce:
1.set up a ssh server on port 7999 
2.set up acm 2.4.1
3. set up an application using an url connecting to git over the non-22 port (pathname: 'ssh://git:7999/somepath/someapp.git' or pathname: 'git:7999/somepath/someapp.git')

Actual results:
"ssh: handshake failed: knownhosts: key is unknown Failed to git clone with the primary channel: ssh: handshake failed: knownhosts: key is unknown"

Expected results:
ssh handshake doesn't fail

Additional info:
port 22 may still be open on the machine and used for another ssh instance.
there are differences between 2.4.1 and 2.4.2 that could affect this :
- 2.4.1 : https://github.com/open-cluster-management/multicloud-operators-subscription/blob/1eb6d1b69e9caf36367697fa0a27d6872ae3e826/pkg/utils/gitrepo.go#L355
- 2.4.2 : https://github.com/open-cluster-management/multicloud-operators-subscription/blob/22f699c0d09671c78ef0d5a7f4880b5522971b7f/pkg/utils/gitrepo.go#L367
more details in private

Comment 4 Roke Jung 2022-01-06 15:58:13 UTC
This will be fixed in 2.4.2. Until 2.4.2 is available, here is the patching instruction. https://github.com/open-cluster-management/multicloud-operators-subscription/blob/main/docs/patching_subscription_image.md Please ask the customer if this can be done until they upgrade to 2.4.2 to resolve the SSH issue. They can use 2.4.2-PR618-84b4eaa24a64d8126e2e9fcaf2eab365cf3604ce image tag with the instruction.

Comment 6 Roke Jung 2022-01-10 14:30:35 UTC
2.4.2 is currently planned for end of February.

Comment 14 errata-xmlrpc 2022-03-03 06:59:24 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Important: Red Hat Advanced Cluster Management 2.4.2 security updates and bug fixes), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2022:0735

Comment 15 Red Hat Bugzilla 2023-09-15 01:18:28 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 500 days


Note You need to log in before you can comment on or make changes to this bug.