jenkinsci / jenkinsci/git-client-plugin

[JENKINS-27606] Git submodule updates ignore url.insteadOf settings in the global config file

Open
#1,476 0 comments 0 reactions 0 assignees View on GitHub
component:git-client-plugin imported-jira-issue priority:minor resolution:unresolved
Dominant language
Java
Stars
152
Forks
402
Avg merge
6h 47m
Merged PRs (30d)
4

Description

When the git config file has url settings such as:

[url "ssh://git@​myserver.com:7999"]

insteadOf = https://myserver.com:8443/scm

git submodule update still attempts to clone from the https url. I'm using this to try to override the remote URL for specific submodules.

Here's the error message:

Cloning into 'folder/modulename'...

fatal: Authentication failed for 'https://myserver.com:8443/scm/proj/project.git/'

Clone of 'https://myserver.com:8443/scm/proj/project.git/' into submodule path 'folder/modulename' failed

at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1591)

at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$500(CliGitAPIImpl.java:86)

at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$6.execute(CliGitAPIImpl.java:893)

at hudson.plugins.git.extensions.impl.SubmoduleOption.onCheckoutCompleted(SubmoduleOption.java:83)

at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1047)

at hudson.scm.SCM.checkout(SCM.java:484)

at hudson.model.AbstractProject.checkout(AbstractProject.java:1270)

at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:609)

at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)

at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:531)

at hudson.model.Run.execute(Run.java:1751)

at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)

at hudson.model.ResourceController.execute(ResourceController.java:89)

at hudson.model.Executor.run(Executor.java:240)

---
Originally reported by chadkillingsworth, imported from: Git submodule updates ignore url.insteadOf settings in the global config file


  • status: Open
  • priority: Minor
  • component(s): git-client-plugin
  • resolution: Unresolved
  • votes: 0
  • watchers: 1
  • imported: 20251211-071809

Raw content of original issue

When the git config file has url settings such as:

[url "ssh://git@myserver.com:7999"]
insteadOf = https://myserver.com:8443/scm

git submodule update still attempts to clone from the https url. I'm using this to try to override the remote URL for specific submodules.

Here's the error message:

Cloning into 'folder/modulename'...
fatal: Authentication failed for 'https://myserver.com:8443/scm/proj/project.git/'
Clone of 'https://myserver.com:8443/scm/proj/project.git/' into submodule path 'folder/modulename' failed

at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1591)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$500(CliGitAPIImpl.java:86)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$6.execute(CliGitAPIImpl.java:893)
at hudson.plugins.git.extensions.impl.SubmoduleOption.onCheckoutCompleted(SubmoduleOption.java:83)
at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1047)
at hudson.scm.SCM.checkout(SCM.java:484)
at hudson.model.AbstractProject.checkout(AbstractProject.java:1270)
at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:609)
at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:531)
at hudson.model.Run.execute(Run.java:1751)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:89)
at hudson.model.Executor.run(Executor.java:240)

environment

```
Jenkins: 1.605 on Windows

git-client-plugin: 1.16.1
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.