This Q&A is related to this one and is slightly different.
1 Answer
https://github.com/jenkinsci/configuration-as-code-plugin/blob/master/demos/jenkins/jenkins.yaml
It should be possible by configuring it like this:
unclassified:
globalLibraries:
libraries:
- name: "some-lib"
retriever:
modernSCM:
scm:
git:
remote: "https://github.com/some-project.git"
credentialsId: 'some-credentials'