Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Not A Defect
-
None
-
git plugin 3.12.0
git client plugin 2.8.2
Jenkins 2.192
github branch source 2.5.6
Description
I use a token for github branch source plugin scanning repositories of an organization.
One of the repos has submodules and the submodules are in the same organization. However, it seems the submodules cannot be cloned using the token. The head repository is cloned correctly.
hudson.plugins.git.GitException: Command "C:\Program Files\git\cmd\git.exe submodule update --init --recursive Common" returned status code 1: stdout: stderr: Cloning into 'C:/Program Files (x86)/Jenkins/workspace/XXXXX/Common'... Host key verification failed. fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists. fatal: clone of 'git@github.ENTREPRISE.com:ORGANIZATION/Cortex_FW_common.git' into submodule path 'C:/Program Files (x86)/Jenkins/workspace/XXXXX/Common' failed Failed to clone 'Common'. Retry scheduled
Submodule authentication requires that the parent repository access and the submodule must use the same protocol. Command line git authentication for HTTP and HTTPS supports username / password credentials. Command line git authentication for ssh supports private key credentials.
In this example, the token is a username / password credential. It can be used to clone the repository with HTTP and HTTPS but cannot be used to clone the repository with ssh. The clone error message indicates that the repository is being cloned with ssh. A private key credential is needed to clone that submodule.