git clone --bare /home/git_repos/admin_pci.git /home/jenkins_bare_repos/admin_pci.git
2. Added the clone as the remote origin for the original so I can push to the clone:
cd /home/git_repos/admin_pci.git
git remote add origin /home/jenkins_bare_repos/admin_pci.git
3. Then created a job in Jenkins: selected GIT for "Source Code Management", Repository URL = /home/jenkins_bare_repos/admin_pci.git, "Branches to Build" = 'master', etc
4. Ran the job and got the following error:
Started by user anonymous Building in workspace /var/lib/jenkins/jobs/admin_pci specs/workspace Checkout:workspace / /var/lib/jenkins/jobs/admin_pci specs/workspace - hudson.remoting.LocalChannel@4eeaabad Using strategy: Default Last Built Revision: Revision 0654d4080e49815ce1869bea3260ecfa2334f5fd (origin/app_testing) Fetching changes from 1 remote Git repository Fetching upstream changes from /home/jenkins_bare_repos/admin_pci.git Commencing build of Revision fee7f8c3386e79bd27459fb76b0085d679ec5012 (origin/master) Checking out Revision fee7f8c3386e79bd27459fb76b0085d679ec5012 (origin/master) FATAL: Command "git submodule update" returned status code 1: stdout: Cloning into vendor/plugins/secure_gate... stderr: Permission denied, please try again. Permission denied, please try again. Permission denied (publickey,password). fatal: The remote end hung up unexpectedly Clone of 'ssh://git_de...@10.100.25.14/home/git_repo/gw_plugin.git' into submodule path 'vendor/plugins/secure_gate' failed hudson.plugins.git.GitException: Command "git submodule update" returned status code 1: stdout: Cloning into vendor/plugins/secure_gate... stderr: Permission denied, please try again. Permission denied, please try again. Permission denied (publickey,password). fatal: The remote end hung up unexpectedly Clone of 'ssh://git_de...@10.100.25.14/home/git_repo/gw_plugin.git' into submodule path 'vendor/plugins/secure_gate' failed at hudson.plugins.git.GitAPI.launchCommandIn(GitAPI.java:855) at hudson.plugins.git.GitAPI.launchCommand(GitAPI.java:817) at hudson.plugins.git.GitAPI.submoduleUpdate(GitAPI.java:446) at hudson.plugins.git.GitSCM$4.invoke(GitSCM.java:1308) at hudson.plugins.git.GitSCM$4.invoke(GitSCM.java:1269) at hudson.FilePath.act(FilePath.java:842) at hudson.FilePath.act(FilePath.java:824) at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1269) at hudson.model.AbstractProject.checkout(AbstractProject.java:1256) at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:589) at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:88) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:494) at hudson.model.Run.execute(Run.java:1502) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:236)
It seems that the submodule of the project cannot be cloned correctly. Is this a well known issue with GIT submodules? Any ideas how to resolve it?
Thanks in advance.
I do have access to the target repo where the GIT submodule is. It's just that it asks for a password since it is shared repo accessible to developers via SSH. Seems the GIT plugin breaks on trying to clone the gitsubmodule since it has no way of knowing the SSH password, basically the GIT plugin hangs.Any ideas whether this is supported as part of the GIT plugin somehow?