jenkinsci / jenkinsci/github-branch-source-plugin

[JENKINS-59546] Git submodule checkout not working

Open
#1,282 2 comments 0 reactions 0 assignees View on GitHub
component:github-branch-source-plugin imported-jira-issue priority:critical resolution:unresolved
Dominant language
Java
Stars
217
Forks
398
Avg merge
30m
Merged PRs (30d)
1

Description

After updating to version 2.5.7 of Github Branch Source we see issues with git submodule. Checkout over ssh is configured. 

Jobs fails with the following logs:

+ git submodule update --init

Submodule 'subrepo' (git@​github.com:orga/subrepo.git) registered for path 'subrepo'

Cloning into 'suprepo'...

Permission denied (publickey).

fatal: Could not read from remote repository.

Please make sure you have the correct access rights

and the repository exists.

Clone of 'git@​github.com:orga/subrepo.git' into submodule path 'subrepo' failed

Remote repo exists and github user (ssh key) has access to repo. Checkout locally works fine.

Any idea? 

 

---
Originally reported by tobsh, imported from: Git submodule checkout not working


  • assignee: bitwiseman
  • status: Open
  • priority: Critical
  • component(s): github-branch-source-plugin
  • resolution: Unresolved
  • votes: 0
  • watchers: 3
  • imported: 2025-12-02

Raw content of original issue

After updating to version 2.5.7 of Github Branch Source we see issues with git submodule. Checkout over ssh is configured. 

Jobs fails with the following logs:
+ git submodule update --init
Submodule 'subrepo' (git@github.com:orga/subrepo.git) registered for path 'subrepo'
Cloning into 'suprepo'...
Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
Clone of 'git@github.com:orga/subrepo.git' into submodule path 'subrepo' failed
Remote repo exists and github user (ssh key) has access to repo. Checkout locally works fine.

Any idea? 

 

environment

```
Jenkins ver. 2.176.3

System Properties:

awt.toolkit sun.awt.X11.XToolkit

executable-war /usr/share/jenkins/jenkins.war

file.encoding UTF-8

file.encoding.pkg sun.io

file.separator /

java.awt.graphicsenv sun.awt.X11GraphicsEnvironment

java.awt.headless true

java.awt.printerjob sun.print.PSPrinterJob

java.class.path /usr/share/jenkins/jenkins.war

java.class.version 52.0

java.endorsed.dirs /usr/local/openjdk-8/jre/lib/endorsed

java.ext.dirs /usr/local/openjdk-8/jre/lib/ext:/usr/java/packages/lib/ext

java.home /usr/local/openjdk-8/jre

java.io.tmpdir /tmp

java.library.path /usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib

java.runtime.name OpenJDK Runtime Environment

java.runtime.version 1.8.0_222-b10

java.specification.name Java Platform API Specification

java.specification.vendor Oracle Corporation

java.specification.version 1.8

java.vendor Oracle Corporation

java.vendor.url http://java.oracle.com/

java.vendor.url.bug http://bugreport.sun.com/bugreport/

java.version 1.8.0_222

java.vm.info mixed mode

java.vm.name OpenJDK 64-Bit Server VM

java.vm.specification.name Java Virtual Machine Specification

java.vm.specification.vendor Oracle Corporation

java.vm.specification.version 1.8

java.vm.vendor Oracle Corporation

java.vm.version 25.222-b10

jenkins.model.Jenkins.slaveAgentPort 50000

jetty.git.hash eb70b240169fcf1abbd86af36482d1c49826fa0b

jna.loaded true

jna.platform.library.path /usr/lib/x86_64-linux-gnu:/lib/x86_64-linux-gnu:/lib64:/usr/lib:/lib:/usr/local/openjdk-8/lib/amd64/jli:/usr/local/openjdk-8/lib/amd64

jnidispatch.path /tmp/jna-3506402/jna1882685250874189469.tmp

line.separator

mail.smtp.sendpartial true

mail.smtps.sendpartial true

os.arch amd64

os.name Linux

os.version 4.4.0-57-generic

path.separator :

sun.arch.data.model 64

sun.boot.class.path /usr/local/openjdk-8/jre/lib/resources.jar:/usr/local/openjdk-8/jre/lib/rt.jar:/usr/local/openjdk-8/jre/lib/sunrsasign.jar:/usr/local/openjdk-8/jre/lib/jsse.jar:/usr/local/openjdk-8/jre/lib/jce.jar:/usr/local/openjdk-8/jre/lib/charsets.jar:/usr/local/openjdk-8/jre/lib/jfr.jar:/usr/local/openjdk-8/jre/classes

sun.boot.library.path /usr/local/openjdk-8/jre/lib/amd64

sun.cpu.endian little

sun.cpu.isalist

sun.font.fontmanager sun.awt.X11FontManager

sun.io.unicode.encoding UnicodeLittle

sun.java.command /usr/share/jenkins/jenkins.war --httpPort=8082

sun.java.launcher SUN_STANDARD

sun.jnu.encoding UTF-8

sun.management.compiler HotSpot 64-Bit Tiered Compilers

sun.os.patch.level unknown

user.dir /

user.home /var/jenkins_home

user.language en

user.name root

user.timezone Europe/Berlin

Plugins

ace-editor 1.1 true

analysis-core 1.96 true

analysis-model-api 6.0.2 true

android-emulator 3.0 true

ansicolor 0.6.2 true

ant 1.10 true

antisamy-markup-formatter 1.6 true

apache-httpcomponents-client-4-api 4.5.10-1.0 true

authentication-tokens 1.3 true

basic-branch-build-strategies 1.3.2 true

bouncycastle-api 2.17 true

branch-api 2.5.4 true

build-name-setter 2.0.3 true

build-pipeline-plugin 1.5.8 true

build-timeout 1.19 true

cloudbees-folder 6.9 true

command-launcher 1.3 true

conditional-buildstep 1.3.6 true

credentials 2.3.0 true

credentials-binding 1.20 true

display-url-api 2.3.2 true

docker-commons 1.15 true

docker-workflow 1.19 true

durable-task 1.30 true

embeddable-build-status 2.0.2 true

external-monitor-job 1.7 true

forensics-api 0.4.1 true

git 3.12.1 true

git-client 2.8.6 true

git-parameter 0.9.11 true

git-server 1.8 true

github 1.29.4 true

github-api 1.95 true

github-branch-source 2.5.7 true

github-oauth 0.33 true

gradle 1.34 true

handlebars 1.1.1 true

htmlpublisher 1.20 true

jackson2-api 2.9.10 true

javadoc 1.5 true

jdk-tool 1.3 true

jquery 1.12.4-1 true

jquery-detached 1.2.1 true

jquery-ui 1.0.2 true

jsch 0.1.55.1 true

junit 1.28 true

ldap 1.20 true

lockable-resources 2.5 true

mailer 1.28 true

matrix-auth 2.4.2 true

matrix-project 1.14 true

maven-plugin 3.4 true

momentjs 1.1.1 true

pam-auth 1.5.1 true

parameterized-trigger 2.35.2 true

pipeline-build-step 2.9 true

pipeline-github-lib 1.0 true

pipeline-graph-analysis 1.10 true

pipeline-input-step 2.11 true

pipeline-milestone-step 1.3.1 true

pipeline-model-api 1.3.9 true

pipeline-model-declarative-agent 1.1.1 true

pipeline-model-definition 1.3.9 true

pipeline-model-extensions 1.3.9 true

pipeline-rest-api 2.12 true

pipeline-stage-step 2.3 true

pipeline-stage-tags-metadata 1.3.9 true

pipeline-stage-view 2.12 true

plain-credentials 1.5 true

port-allocator 1.8 true

postbuild-task 1.8 true

resource-disposer 0.13 true

role-strategy 2.14 true

run-condition 1.2 true

scm-api 2.6.3 true

script-security 1.64 true

slack 2.27 true

ssh-agent 1.17 true

ssh-credentials 1.17.3 true

ssh-slaves 1.30.2 true

structs 1.20 true

timestamper 1.10 true

token-macro 2.8 true

trilead-api 1.0.3 true

warnings 5.0.1 true

warnings-ng 6.0.4 true

windows-slaves 1.4 true

workflow-aggregator 2.6 true

workflow-api 2.37 true

workflow-basic-steps 2.18 true

workflow-cps 2.74 true

workflow-cps-global-lib 2.15 true

workflow-durable-task-step 2.34 true

workflow-job 2.35 true

workflow-multibranch 2.21 true

workflow-scm-step 2.9 true

workflow-step-api 2.20 true

workflow-support 3.3 true

ws-cleanup 0.37 true

```

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.