When creating shared libraries (either globally or configured on a job), I can select credentials which should be used. But during job execution these credentials seem to be ignored (judging from the command line shown in the log) and the clone/pull subsequently fails with an HTTP error 404.
The library is configured as:
- Load implicitly (without that, but with @Library it does not work as well)
- Modern SCM (Mercurial)
- Global credentials
- Mercurial installation with cache
The same settings are also configured for the multibranch projects as branch source, here it works just fine.
Command line log from build script:
Command line log from shared library:
As can be seen, the working command line includes some options missing in the other case:
Current workaround is to enable anonymous access to the repositories, but that shall be disabled as soon as possibe.