Jenkins - Problems downloading private libs

I’m trying to use a Jenkins pipeline project to build a number of our PlatformIO projects.
Most project have dependencies on private github repositories of our own which works fine when building from PlatformIO itsself.

When I try to pio run such a project in Jenkins, then the build gets stuck when it tries to download the private repositories, probably because it is asking for credentials.

I’ve tried using all kinds of posibilities to specify the credentials to use with i.e. withCredentials() or defining GIT_ASKPASS function … but nothing seems to work.

Does anybody have any experience with this?

Nobody that can shed any light on this?

Can you run pio run -v to know exactly where it’s stuck?

If it’ stuck in a git username/password prompt, isn’t this a question about configuring your git client to automatically use some creds?