Submodule authentication in the git plugin and git client plugin requires that the same protocol must be used for the parent repository and the submodules. Different credential methods are required to provide command line git with http/https credentials than with ssh credentials. A mix of the two in a single repository definition would require much more sophisticated operations from the git plugin than it is currently able to perform.
If the submodules and the parent repo are all using the same protocol (ssh or http), then you may need to enable the checkbox which causes the git plugin to use credentials with submodule operations. I believe it is disabled by default. On Thu, May 23, 2019 at 5:37 AM Ewelina Wilkosz <ewelin...@gmail.com> wrote: > I have a pipelineJob where I use ssh to clone repository and configured > credentials, let's call it X, are working great > > I also have a multibranch pipeline, where I configured "Checkout over SSH" > and select same X credentials, but I can't clone > I get > > ERROR: Error fetching remote repo 'origin' > [...] > stderr: Permission denied (public key) > fatal: Could not read from remote repository > > The same user could clone via https, but there are some submodules > configured via ssh, so I need ssh working... > > Any ideas? > > -- > You received this message because you are subscribed to the Google Groups > "Jenkins Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to jenkinsci-users+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/jenkinsci-users/89f8e2a2-6082-4642-90ac-31f8da684c06%40googlegroups.com > <https://groups.google.com/d/msgid/jenkinsci-users/89f8e2a2-6082-4642-90ac-31f8da684c06%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- Thanks! Mark Waite -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAO49JtF8g3UCfGuqr02roM4HBkOhQgqVxA7T7nwRRtWBawMwOA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.