Why is Jenkins getting Authentication Failed error for git submodule update? Why is Jenkins getting Authentication Failed error for git submodule update? jenkins jenkins

Why is Jenkins getting Authentication Failed error for git submodule update?


Versions of the Jenkins git plugin prior to 3.0.0 did not support submodule authentication. Submodule authentication using the same credentials and protocol as the parent repository are now supported with the Jenkins git plugin. Support was added in the 10 Sep 2016 release of Jenkins git plugin 3.0.0.

The submodule configuration portion of the job definition page ("Additional Behaviours" > "Advanced Sub-modules Behaviours") includes a checkbox "Use credentials from default remote of parent repository". Check that box and the credentials from the parent repository will be used for the submodules.

Note: the repository cloning protocols must be the same (ssh or https) for the parent repository and all the submodules, otherwise the parent credentials can't be used with the submodule repository.


Try to copy the /.shh folder into your Jenkins home directory.


I faced this issue, with Jenkins Slave (executed as Windows Service).I solved it by deploying Jenkins SSH key in the .ssh directory of the SYSTEM user:

C:\Windows\SysWOW64\config\systemprofile\.ssh\

SYSTEM home directory varies depending on OS version and setup. To identify it just echo env. var. %USERPROFILE%