{"id":21980027,"url":"https://github.com/jenkinsci/credentials-binding-plugin","last_synced_at":"2025-04-04T14:05:13.524Z","repository":{"id":10943564,"uuid":"13251519","full_name":"jenkinsci/credentials-binding-plugin","owner":"jenkinsci","description":null,"archived":false,"fork":false,"pushed_at":"2025-03-24T00:27:36.000Z","size":705,"stargazers_count":55,"open_issues_count":3,"forks_count":104,"subscribers_count":107,"default_branch":"master","last_synced_at":"2025-03-28T13:06:01.254Z","etag":null,"topics":["credential-manager","credentials","secrets"],"latest_commit_sha":null,"homepage":"https://plugins.jenkins.io/credentials-binding/","language":"Java","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jenkinsci.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2013-10-01T18:18:46.000Z","updated_at":"2025-03-11T23:49:56.000Z","dependencies_parsed_at":"2024-01-22T15:11:20.164Z","dependency_job_id":"264378d5-6ada-452e-bb49-0ba858c6b7a6","html_url":"https://github.com/jenkinsci/credentials-binding-plugin","commit_stats":{"total_commits":511,"total_committers":43,"mean_commits":"11.883720930232558","dds":0.62426614481409,"last_synced_commit":"01be46cee7fca7bc01b620d81db5c5eafc52225a"},"previous_names":[],"tags_count":45,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jenkinsci%2Fcredentials-binding-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jenkinsci%2Fcredentials-binding-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jenkinsci%2Fcredentials-binding-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jenkinsci%2Fcredentials-binding-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jenkinsci","download_url":"https://codeload.github.com/jenkinsci/credentials-binding-plugin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247187989,"owners_count":20898417,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["credential-manager","credentials","secrets"],"created_at":"2024-11-29T17:09:09.695Z","updated_at":"2025-04-04T14:05:13.505Z","avatar_url":"https://github.com/jenkinsci.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Jenkins Credentials Binding Plugin\nAllows credentials to be bound to environment variables for use from\nmiscellaneous build steps.\n\nYou may have a keystore for jarsigner, a list of passwords, or other\nconfidential files or strings which you want to be used by a job but\nwhich should not be kept in its SCM, or even visible from its\nconfig.xml. Saving these files on the server and referring to them by\nabsolute path requires you to have a server login, and does not work on\nagents. This plugin gives you an easy way to package up all a job’s\nsecret files and passwords and access them using a single environment\nvariable during the build.\n\nTo use, first go to the Credentials link and add items of type *Secret\nfile* and/or *Secret text*. Now in a freestyle job, check the box *Use\nsecret text(s) or file(s)* and add some variable bindings which will use\nyour credentials. The resulting environment variables can be accessed\nfrom shell script build steps and so on. (You probably want to start any\nshell script with `set +x`, or batch script with `@echo off`.\n[JENKINS-14731](https://issues.jenkins-ci.org/browse/JENKINS-14731)).\n\nFor more details of how this works, check the [Injecting secrets into builds](https://docs.cloudbees.com/docs/cloudbees-ci/latest/cloud-secure-guide/injecting-secrets)\narticle at CloudBees.\n\nFrom a Pipeline job, define your credentials, then check *Snippet\nGenerator* for a syntax example of the `withCredentials` step. Any\nsecrets in the build log will be masked automatically.\n\nA typical example of a username password type credential (example from\nhere) would look like: \n\n```groovy\nwithCredentials([usernamePassword(credentialsId: 'amazon', usernameVariable: 'USERNAME', passwordVariable: 'PASSWORD')]) {\n  // available as an env variable, but will be masked if you try to print it out any which way\n  // note: single quotes prevent Groovy interpolation; expansion is by Bourne Shell, which is what you want\n  sh 'echo $PASSWORD'\n  // also available as a Groovy variable\n  echo USERNAME\n  // or inside double quotes for string interpolation\n  echo \"username is $USERNAME\"\n}\n```\n\n#### Note\n\nYou should use a single quote (`'`) instead of a double quote (`\"`) whenever you can. \nThis is particularly important in Pipelines where a statement may be interpreted by both the Pipeline engine and an external interpreter, such as a Unix shell (`sh`) or Windows Command (`bat`) or Powershell (`ps`). \nThis reduces complications with password masking and command processing. \nThe first step in the above example properly demonstrates this.\nIt references an environment variable, so the single-quoted string passes its value unprocessed to the `sh` step, and the shell interprets `$PASSWORD`.\nThe next two steps use the basic Pipeline `echo` step.\nThe last one needs to use double quotes, so that the [string interpolation](https://en.wikipedia.org/wiki/String_interpolation) is performed by the Pipeline DSL.\n\nFor more information, see the Pipeline step reference for [Credentials Binding Plugin](https://www.jenkins.io/doc/pipeline/steps/credentials-binding/).\n\n## Changelog\n\nSee [GitHub Releases](https://github.com/jenkinsci/credentials-binding-plugin/releases) for new releases (version 1.20 and newer),\nor the [old changelog](old-changelog.md) for history (version 1.19 and earlier).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjenkinsci%2Fcredentials-binding-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjenkinsci%2Fcredentials-binding-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjenkinsci%2Fcredentials-binding-plugin/lists"}