# How to use withcredentials syntax in shared library groovy script

**URL:** <https://community.jenkins.io/t/how-to-use-withcredentials-syntax-in-shared-library-groovy-script/14140>\
**Category:** Using Jenkins\
**Created:** [April 11, 2024, 12:58pm UTC](https://community.jenkins.io/t/how-to-use-withcredentials-syntax-in-shared-library-groovy-script/14140 "2024-04-11T12:58:41Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![neeraja3](https://avatars.discourse-cdn.com/v4/letter/n/258eb7/32.png) [@neeraja3](https://community.jenkins.io/u/neeraja3)\
**Post date:** [April 11, 2024, 12:58pm UTC](https://community.jenkins.io/t/how-to-use-withcredentials-syntax-in-shared-library-groovy-script/14140/1 "2024-04-11T12:58:41Z")

</div>

Can anyone help me how to use the git credentials using a shared library concept in groovy script using withCredentials method and how to call in another shared library groovy file.
