Skip to content

Windows agents connected to Jenkins by SSH hang when cloning an SSH repo from github.com #1715

@MarkEWaite

Description

@MarkEWaite

Jenkins and plugins versions report

Environment
Jenkins: 2.528.3
OS: Linux - 6.8.0-90-generic
Java: 21.0.9 - Eclipse Adoptium (OpenJDK 64-Bit Server VM)
---
PrioritySorter:905.v35c21f62f980
adoptopenjdk:146.v1898676a_f04e
analysis-model-api:13.18.0-933.v90e9a_fdff4e2
ant:520.vd082ecfb_16a_9
antisamy-markup-formatter:173.v680e3a_b_69ff3
apache-httpcomponents-client-4-api:4.5.14-269.vfa_2321039a_83
apache-httpcomponents-client-5-api:5.5-170.v023de017ccd7
asm-api:9.9.1-189.vb_5ef2964da_91
authentication-tokens:1.144.v5ff4a_5ec5c33
badge:2.562.vc3c0b_6925377
basic-branch-build-strategies:275.vde2351b_4a_58b_
bootstrap5-api:5.3.8-895.v4d0d8e47fea_d
bouncycastle-api:2.30.1.82-277.v70ca_0b_877184
branch-api:2.1268.v044a_87612da_8
build-blocker-plugin:166.vc82fc20b_a_ed6
build-name-setter:2.5.1
build-timeout:1.38
caffeine-api:3.2.3-194.v31a_b_f7a_b_5a_81
checks-api:373.vfe7645102093
cloud-stats:377.vd8a_6c953e98e
cloudbees-bitbucket-branch-source:937.2.2
cloudbees-folder:6.1073.va_7888eb_dd514
clover:4.15.0.677.v22c71ca_e6450
command-launcher:123.v37cfdc92ef67
commons-collections4-api:4.5.0-8.va_d5448ef9011
commons-compress-api:1.28.0-2
commons-lang3-api:3.20.0-109.ve43756e2d2b_4
commons-text-api:1.15.0-210.v7480a_da_70b_9e
conditional-buildstep:1.5.0
config-file-provider:1006.vc7366c201f57
configuration-as-code:2006.v001a_2ca_6b_574
copyartifact:770.va_6c69e063442
coverage:2.3060.v035a_5557cdb_c
coverage-badges-extension:197.vb_390173d00ec
credentials:1453.v9b_a_29777a_b_fd
credentials-binding:702.vfe613e537e88
dark-theme:574.va_19f05d54df5
data-tables-api:2.3.5-1482.vb_47a_3c19f78c
description-setter:264.v1957f215dcd5
display-url-api:2.217.va_6b_de84cc74b_
docker-commons:457.v0f62a_94f11a_3
docker-java-api:3.7.0-133.v93b_8fb_c17a_77
docker-plugin:1308.vff6e33248305
docker-workflow:634.vedc7242b_eda_7
durable-task:639.vefb_3d8372f6d
echarts-api:6.0.0-1165.vd1283a_3e37d4
eddsa-api:0.3.0.1-19.vc432d923e5ee
elastic-axis:615.vb_f7c20ec040e
embeddable-build-status:637.vd878e68178f8
emoji-symbols-api:17.0-57.v8d44b_9a_b_d5ea_
envinject:2.926.v69c9b_3896a_96
envinject-api:1.236.v35fd4d7eb_515
external-monitor-job:223.vb_fddcf42c9b_3
font-awesome-api:7.1.0-882.v1dfb_771e3278
forensics-api:3.1772.v99ca_3d83b_9fa_
git:5.8.1
git-client:6.5.0-rc3827.2d48986d8de0
git-forensics:3.2138.vf25ea_d549e33
git-parameter:460.v71e7583a_c099
git-server:137.ve0060b_432302
git-version-monitor:7.v2a_0f40b_9f2f4
gitea:250.v76a_0b_d4fef5b_
github:1.45.0
github-api:1.330-492.v3941a_032db_2a_
github-branch-source:1917.v9ee8a_39b_3d0d
github-scm-filter-aged-refs:59.vc6b_39c26988c
github-scm-trait-commit-skip:0.4.0
gitlab-api:6.2.0-111.vf174d6b_8c12e
gitlab-branch-source:739.v9781b_1cdb_72a_
gitlab-plugin:1.9.11
groovy-postbuild:272.v52a_03efb_8653
gson-api:2.13.2-173.va_a_092315913c
h2-api:11.1.4.199-36.vb_ee07e965744
handy-uri-templates-2-api:2.1.8-38.vcea_5d521d5f3
http_request:1.24
ignore-committer-strategy:37.v0d3157c4a_ef8
implied-labels:439.v4900744249a_3
instance-identity:203.v15e81a_1b_7a_38
ionicons-api:94.vcc3065403257
jackson2-api:2.20.1-423.v13951f6b_6532
jakarta-activation-api:2.1.4-1
jakarta-mail-api:2.1.5-1
jakarta-xml-bind-api:4.0.6-10.v9b_7e1d1fc40b_
javadoc:354.vee1a_660b_4990
javax-activation-api:1.2.0-8
javax-mail-api:1.6.2-11
jaxb:2.3.9-133.vb_ec76a_73f706
jdk-tool:83.v417146707a_3d
jersey2-api:2.47-165.ve7809a_3e87e0
jersey3-api:3.1.11-4.v77818819c2e1
jira:3.20
jjwt-api:0.11.5-120.v0268cf544b_89
job-dsl:1.93
joda-time-api:2.14.0-149.v1c3ce991d1b_9
jquery3-api:3.7.1-619.vdb_10e002501a_
jsch:0.2.16-95.v3eecb_55fa_b_78
json-api:20250517-173.v596efb_962a_31
json-path-api:2.10.0-202.va_9cc16c1e476
jsoup:1.21.2-66.v6ea_38164b_8a_2
jspecify-api:1.0.0-1.ve7231e6d0d15
junit:1369.v15da_00283f06
junit-attachments:330.v25180b_263160
junit-realtime-test-reporter:166.v889e7b_0e23a_a_
label-verifier:116.vb_845759df630
mailer:525.v2458b_d8a_1a_71
markdown-formatter:312.va_b_3dea_1413a_f
matrix-auth:3.2.9
matrix-project:870.v9db_fcfc2f45b_
maven-plugin:3.27
metrics:4.2.37-489.vb_6db_69b_ce753
mina-sshd-api-common:2.16.0-167.va_269f38cc024
mina-sshd-api-core:2.16.0-167.va_269f38cc024
monitoring:2.6.0
naginator:1.530.vb_6d120f250b_1
nodelabelparameter:759.vb_b_e95db_f3251
okhttp-api:4.12.0-195.vc02552c04ffd
oss-symbols-api:424.ved751e062911
parallel-test-executor:611.va_92b_d1852e52
parameterized-trigger:873.v8b_e37dd8418f
pipeline-build-step:571.v08a_fffd4b_0ce
pipeline-github:2.8-162.382498405fdc
pipeline-github-lib:65.v203688e7727e
pipeline-graph-analysis:245.v88f03631a_b_21
pipeline-graph-view:661.v6003f4542123
pipeline-groovy-lib:787.ve2fef0efdca_6
pipeline-input-step:540.v14b_100d754dd
pipeline-maven:1567.vb_2c3a_2116860
pipeline-maven-api:1567.vb_2c3a_2116860
pipeline-milestone-step:138.v78ca_76831a_43
pipeline-model-api:2.2277.v00573e73ddf1
pipeline-model-definition:2.2277.v00573e73ddf1
pipeline-model-extensions:2.2277.v00573e73ddf1
pipeline-stage-step:322.vecffa_99f371c
pipeline-stage-tags-metadata:2.2277.v00573e73ddf1
pipeline-utility-steps:2.20.0
plain-credentials:199.v9f8e1f741799
platformlabeler:2734.v604521b_646b_b_
plot:2.4.0
plugin-util-api:6.1192.v30fe6e2837ff
pollscm:1.9
preSCMbuildstep:115.vf9808414429d
prism-api:1.30.0-630.va_e19d17f83b_0
promoted-builds:992.va_00888f21b_74
resource-disposer:0.25
run-condition:243.v3c3f94e46a_8b_
scm-api:724.v7d839074eb_5c
script-security:1385.v7d2d9ec4d909
snakeyaml-api:2.5-143.v93b_c004f89de
ssh-agent:386.v36cc0c7582f0
ssh-credentials:361.vb_f6760818e8c
ssh-slaves:3.1085.vc64d040efa_85
sshd:3.374.v19b_d59ce6610
structs:362.va_b_695ef4fdf9
swarm:3.51
testng-plugin:940.vc244edffc2ec
text-finder:1.33
theme-manager:327.v780d7096ec29
throttle-concurrents:2.18
timestamper:1.30
token-macro:477.vd4f0dc3cb_cf1
trilead-api:2.284.v1974ea_324382
variant:70.va_d9f17f859e0
versioncolumn:320.v6b_b_814ca_01f7
view-job-filters:405.v9a_5fddc9230d
warnings-ng:12.9936.vda_5743ded29a_
workflow-aggregator:608.v67378e9d3db_1
workflow-api:1384.vdc05a_48f535f
workflow-basic-steps:1098.v808b_fd7f8cf4
workflow-cps:4238.va_6fb_65c1f699
workflow-durable-task-step:1464.v2d3f5c68f84c
workflow-job:1559.va_a_533730b_ea_d
workflow-multibranch:821.vc3b_4ea_780798
workflow-scm-step:466.va_d69e602552b_
workflow-step-api:710.v3e456cc85233
workflow-support:1010.vb_b_39488a_9841
ws-cleanup:0.49
xshell:325.v3fda_132b_2641

What Operating System are you using (both controller, and any agents involved in the problem)?

Linux controller with Windows agents connected through SSH. Using the Windows OpenSSH server with Windows 10 and Windows 11 agents

Reproduction steps

  1. Start a Jenkins controller on Linux
  2. Add an SSH private key to connect a Windows agent with SSH
  3. Define a Windows agent that Jenkins starts with SSH
  4. Define an SSH private key that can clone a GitHub repository
  5. Define a Jenkins job that uses the SSH private key to clone the repository
  6. Run the Jenkins job and see that the git command fails with 6.5.0 incremental build

Expected Results

Git fetch command should not hang

Actual Results

Git fetch command hangs

Anything else?

Problem does not happen with Git Client plugin 6.4.2, only on the master branch.

I suspect that the issue is caused by the change to use the system SSH.exe instead of using the one provided by MinGit_

Are you interested in contributing a fix?

@akash-manna-sky since you submitted the pull request with that change, could you be the first to investigate it? Original pull request was:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions