jenkinsci / jenkinsci/git-plugin

[JENKINS-49497] Proxy not set when doing lightweight checkout

Open
#3,263 1 comment 0 reactions 0 assignees View on GitHub
component:git-plugin component:scm-api-plugin imported-jira-issue priority:minor resolution:unresolved
Dominant language
Java
Stars
694
Forks
1.1k
Avg merge
1h 29m
Merged PRs (30d)
3

Description

I've setup a pipeline project that pulls pipeline script from SCM, and by default "Lightweight checkout"  is checked. This causes an error saying that:

hudson.plugins.git.GitException: Command "git fetch --tags --progress origin +refs/heads/master:refs/remotes/origin/master --prune" returned status code 128:

stdout:
stderr: fatal: unable to access 'https://github.com/owner/repo.git/': Failed connect to github.com:443; Connection refused

    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1996)
    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1715)
    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$300(CliGitAPIImpl.java:72)
    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:405)
    at jenkins.plugins.git.GitSCMFileSystem$BuilderImpl.build(GitSCMFileSystem.java:351)
    at jenkins.scm.api.SCMFileSystem.of(SCMFileSystem.java:196)
    at jenkins.scm.api.SCMFileSystem.of(SCMFileSystem.java:172)
    at org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:107)
    at org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:67)
    at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:271)
    at hudson.model.ResourceController.execute(ResourceController.java:97)
    at hudson.model.Executor.run(Executor.java:421)
Finished: FAILURE

When deselecting the Lightweight checkout, the cloning works just fine.

I suspect that the proxy configuration is not passed on to the git client instance that does the lightweight checkout.

---
Originally reported by davstein, imported from: Proxy not set when doing lightweight checkout


  • status: Open
  • priority: Minor
  • component(s): git-plugin, scm-api-plugin
  • resolution: Unresolved
  • votes: 0
  • watchers: 2
  • imported: 2025-12-02

Raw content of original issue

I've setup a pipeline project that pulls pipeline script from SCM, and by default "Lightweight checkout"  is checked. This causes an error saying that:



hudson.plugins.git.GitException: Command "git fetch --tags --progress origin +refs/heads/master:refs/remotes/origin/master --prune" returned status code 128:

stdout:
stderr: fatal: unable to access 'https://github.com/owner/repo.git/': Failed connect to github.com:443; Connection refused

    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1996)
    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1715)
    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$300(CliGitAPIImpl.java:72)
    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:405)
    at jenkins.plugins.git.GitSCMFileSystem$BuilderImpl.build(GitSCMFileSystem.java:351)
    at jenkins.scm.api.SCMFileSystem.of(SCMFileSystem.java:196)
    at jenkins.scm.api.SCMFileSystem.of(SCMFileSystem.java:172)
    at org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:107)
    at org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:67)
    at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:271)
    at hudson.model.ResourceController.execute(ResourceController.java:97)
    at hudson.model.Executor.run(Executor.java:421)
Finished: FAILURE


When deselecting the Lightweight checkout, the cloning works just fine.

I suspect that the proxy configuration is not passed on to the git client instance that does the lightweight checkout.

  • environment: git-client-plugin 2.7.1, jenkins 2.89.3

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.