You should make use of the Jenkins credentials store. https://www.jenkins.io/doc/book/using/using-credentials/ Several kinds of secrets can be stored there. Type "User and password" suits your needs.
How to use that in your pipeline script: https://www.jenkins.io/doc/pipeline/steps/credentials-binding/ [email protected] schrieb am Freitag, 20. Januar 2023 um 21:37:38 UTC+1: > Hi, > > Here is my build.gradle: > > repositories { > mavenLocal() > mavenCentral() > // nexus credentials (nexusUser and nexusPassword) are stored in > ~/.gradle/gradle.properties > maven { > url "${nexusRepoUrl}/repository/maven-public/" > credentials { > username = nexusUser > password = nexusPassword > } > } > } > > How can I provide nexusUser and nexusPassword to the job (ideally > globally)? > > Regards, Sunil > > -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/696d22d9-16ad-4a97-877a-ff9510a6be74n%40googlegroups.com.
