When recursively updating git submodules an exception is thrown (see attached log file). The submodule "BuildConfig" exists and is correctly configured in my .gitmodules file.
The command that extracts all submodules works:
> git config -f .gitmodules --get-regexp ^submodule\.(.+)\.url # timeout=10
But the url can not be fetched:
> git config --get submodule.BuildScripts.url # timeout=10
hudson.plugins.git.GitException: Command "git config --get submodule.BuildScripts.url" returned status code 1:
....
Problem is the missing file reference to .gitmodules like it exists in the first command:
-f .gitmodules
Edit: I found that the above behavior comes from the '.git/config' and '.gitmodules' files being inconsistent.
I propose that for consistency reasons either '-f .gitmodules' gets removed from
git config -f .gitmodules --get-regexp ^submodule\.(.+)\.url
or
git config --get submodule.XXX.url
is changed to
git config -f .gitmodules --get submodule.XXX.url
As Git does favor the latter formatting I prefer using '.gitmodules' over '.git/config' for submodules.
Originally reported by monthycurious, imported from: Updating submodules not working
- assignee: monthycurious
- status: Open
- priority: Minor
- component(s): git-client-plugin
- label(s): git
- resolution: Unresolved
- votes: 0
- watchers: 2
- imported: 20251211-071809
Raw content of original issue
When recursively updating git submodules an exception is thrown (see attached log file). The submodule "BuildConfig" exists and is correctly configured in my .gitmodules file.
The command that extracts all submodules works:
> git config -f .gitmodules --get-regexp ^submodule\.(.+)\.url # timeout=10
But the url can not be fetched:
> git config --get submodule.BuildScripts.url # timeout=10
hudson.plugins.git.GitException: Command "git config --get submodule.BuildScripts.url" returned status code 1:
....
Problem is the missing file reference to .gitmodules like it exists in the first command:
Edit: I found that the above behavior comes from the '.git/config' and '.gitmodules' files being inconsistent.
I propose that for consistency reasons either '-f .gitmodules' gets removed from
git config -f .gitmodules --get-regexp ^submodule\.(.+)\.url
or
git config --get submodule.XXX.url
is changed to
git config -f .gitmodules --get submodule.XXX.url
As Git does favor the latter formatting I prefer using '.gitmodules' over '.git/config' for submodules.
environment
Jenkins: 2.504.3 (in Docker version 28.3.0, build 38b7060)<br/>
OS: Linux - 6.1.0-37-amd64<br/>
Java: 21.0.7 - Eclipse Adoptium (OpenJDK 64-Bit Server VM)<br/>
---<br/>
ant:513.vde9e7b_a_0da_0f<br/>
antisamy-markup-formatter:173.v680e3a_b_69ff3<br/>
apache-httpcomponents-client-4-api:4.5.14-269.vfa_2321039a_83<br/>
apache-httpcomponents-client-5-api:5.5-150.veb_76e719855b_<br/>
asm-api:9.8-135.vb_2239d08ee90<br/>
authentication-tokens:1.131.v7199556c3004<br/>
blueocean:1.27.21<br/>
blueocean-bitbucket-pipeline:1.27.21<br/>
blueocean-commons:1.27.21<br/>
blueocean-config:1.27.21<br/>
blueocean-core-js:1.27.21<br/>
blueocean-dashboard:1.27.21<br/>
blueocean-display-url:2.4.4<br/>
blueocean-events:1.27.21<br/>
blueocean-git-pipeline:1.27.21<br/>
blueocean-github-pipeline:1.27.21<br/>
blueocean-i18n:1.27.21<br/>
blueocean-jwt:1.27.21<br/>
blueocean-personalization:1.27.21<br/>
blueocean-pipeline-api-impl:1.27.21<br/>
blueocean-pipeline-editor:1.27.21<br/>
blueocean-pipeline-scm-api:1.27.21<br/>
blueocean-rest:1.27.21<br/>
blueocean-rest-impl:1.27.21<br/>
blueocean-web:1.27.21<br/>
bootstrap5-api:5.3.5-1<br/>
bouncycastle-api:2.30.1.80-261.v00c0e2618ec3<br/>
branch-api:2.1226.ve1e7e0b_4b_95f<br/>
build-timeout:1.38<br/>
caffeine-api:3.2.0-166.v72a_6d74b_870f<br/>
checks-api:373.vfe7645102093<br/>
cloud-stats:377.vd8a_6c953e98e<br/>
cloudbees-bitbucket-branch-source:936.4.1<br/>
cloudbees-folder:6.1026.ve06dfa_cf31c3<br/>
commons-compress-api:1.27.1-3<br/>
commons-lang3-api:3.17.0-87.v5cf526e63b_8b_<br/>
commons-text-api:1.13.1-176.v74d88f22034b_<br/>
config-file-provider:988.v0461fcc2b_9d1<br/>
credentials:1415.v831096eb_5534<br/>
credentials-binding:687.v619cb_15e923f<br/>
dark-theme:524.vd675b_22b_30cb_<br/>
display-url-api:2.209.v582ed814ff2f<br/>
docker-commons:457.v0f62a_94f11a_3<br/>
docker-java-api:3.5.1-116.v2798d5ed4ce7<br/>
docker-plugin:1274.vc0203fdf2e74<br/>
docker-workflow:621.va_73f881d9232<br/>
durable-task:587.v84b_877235b_45<br/>
echarts-api:5.6.0-4<br/>
eddsa-api:0.3.0.1-19.vc432d923e5ee<br/>
email-ext:1911.v19b_8e86f9815<br/>
favorite:2.237.v79163ca_8b_892<br/>
font-awesome-api:6.7.2-1<br/>
git:5.7.0<br/>
git-client:6.2.0<br/>
github:1.43.0<br/>
github-api:1.321-488.v9b_c0da_9533f8<br/>
github-branch-source:1824.v046257273408<br/>
gradle:2.15<br/>
gson-api:2.13.1-139.v4569c2ef303f<br/>
handy-uri-templates-2-api:2.1.8-36.v85e4cb_234a_13<br/>
htmlpublisher:425<br/>
instance-identity:203.v15e81a_1b_7a_38<br/>
ionicons-api:88.va_4187cb_eddf1<br/>
jackson2-api:2.19.0-404.vb_b_0fd2fea_e10<br/>
jakarta-activation-api:2.1.3-2<br/>
jakarta-mail-api:2.1.3-2<br/>
javadoc:327.vdfe586651ee0<br/>
javax-activation-api:1.2.0-8<br/>
jaxb:2.3.9-133.vb_ec76a_73f706<br/>
jenkins-design-language:1.27.21<br/>
jjwt-api:0.11.5-120.v0268cf544b_89<br/>
joda-time-api:2.14.0-127.v7d9da_295a_d51<br/>
jquery3-api:3.7.1-3<br/>
jsch:0.2.16-95.v3eecb_55fa_b_78<br/>
json-api:20250517-153.vc8a_a_d87c0ce3<br/>
json-path-api:2.9.0-148.v22a_7ffe323ce<br/>
jsoup:1.21.1-52.v96e4041b_60fd<br/>
junit:1335.v6b_a_a_e18534e1<br/>
ldap:780.vcb_33c9a_e4332<br/>
mailer:509.vc54d23fc427e<br/>
matrix-auth:3.2.6<br/>
matrix-project:849.v0cd64ed7e531<br/>
maven-plugin:3.26<br/>
metrics:4.2.32-476.v5042e1c1edd7<br/>
mina-sshd-api-common:2.15.0-161.vb_200831a_c15b_<br/>
mina-sshd-api-core:2.15.0-161.vb_200831a_c15b_<br/>
okhttp-api:4.11.0-189.v976fa_d3379d6<br/>
oss-symbols-api:356.v2da_d59a_3742b_<br/>
pam-auth:1.12<br/>
pipeline-build-step:571.v08a_fffd4b_0ce<br/>
pipeline-github-lib:65.v203688e7727e<br/>
pipeline-graph-analysis:241.vc3d48fb_b_2582<br/>
pipeline-graph-view:588.v1efd7e219272<br/>
pipeline-groovy-lib:752.vdddedf804e72<br/>
pipeline-input-step:527.vd61b_1d3c5078<br/>
pipeline-milestone-step:138.v78ca_76831a_43<br/>
pipeline-model-api:2.2255.v56a_15e805f12<br/>
pipeline-model-definition:2.2255.v56a_15e805f12<br/>
pipeline-model-extensions:2.2255.v56a_15e805f12<br/>
pipeline-stage-step:322.vecffa_99f371c<br/>
pipeline-stage-tags-metadata:2.2255.v56a_15e805f12<br/>
plain-credentials:199.v9f8e1f741799<br/>
plugin-util-api:6.1.0<br/>
pubsub-light:1.19<br/>
resource-disposer:0.25<br/>
scm-api:704.v3ce5c542825a_<br/>
script-security:1373.vb_b_4a_a_c26fa_00<br/>
snakeyaml-api:2.3-125.v4d77857a_b_402<br/>
sse-gateway:1.28<br/>
ssh-credentials:359.v2191c4cf635f<br/>
ssh-slaves:3.1031.v72c6b_883b_869<br/>
structs:350.v3b_30f09f2363<br/>
theme-manager:294.vf2c2fd783821<br/>
timestamper:1.29<br/>
token-macro:444.v52de7e9c573d<br/>
trilead-api:2.209.v0e69b_c43c245<br/>
variant:70.va_d9f17f859e0<br/>
workflow-aggregator:608.v67378e9d3db_1<br/>
workflow-api:1373.v7b_813f10efa_b_<br/>
workflow-basic-steps:1079.vce64b_a_929c5a_<br/>
workflow-cps:4150.ve20ca_b_a_a_2815<br/>
workflow-durable-task-step:1431.v16e66c8a_58b_f<br/>
workflow-job:1540.v295eccc9778f<br/>
workflow-multibranch:806.vb_b_688f609ee9<br/>
workflow-scm-step:437.v05a_f66b_e5ef8<br/>
workflow-step-api:700.v6e45cb_a_5a_a_21<br/>
workflow-support:968.v8f17397e87b_8<br/>
ws-cleanup:0.48<br/>
3 attachments
When recursively updating git submodules an exception is thrown (see attached log file). The submodule "BuildConfig" exists and is correctly configured in my .gitmodules file.
The command that extracts all submodules works:
But the url can not be fetched:
> git config --get submodule.BuildScripts.url # timeout=10 hudson.plugins.git.GitException: Command "git config --get submodule.BuildScripts.url" returned status code 1: ....Problem is the missing file reference to .gitmodules like it exists in the first command:
Edit: I found that the above behavior comes from the '.git/config' and '.gitmodules' files being inconsistent.
I propose that for consistency reasons either '-f .gitmodules' gets removed from
or
is changed to
As Git does favor the latter formatting I prefer using '.gitmodules' over '.git/config' for submodules.
Originally reported by monthycurious, imported from: Updating submodules not working
Raw content of original issue
environment
3 attachments