-
Notifications
You must be signed in to change notification settings - Fork 736
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Modify GitHubBuilder to resolve user credentials from the system envi…
…ronment Using the Jenkins EnvInject or Credentials Binding Plugins its possible to pass credentials as Environment Variables. Its useful for Github.connect() to be able to directly read the values of the login, password and oauth properties from the environment. This commit modifies the base Github.connect() method to resolve credentials in two steps: 1. ~/.github credentials file if it exists. 2. login, password or oauth variables from the environment A further fromEnvironment() method is provided to support loading from non-standard variable names. The old Github.connect() method would throw an IOException if the ~/.github file did not exist. Now it will fail silently instead dropping back to the anonymous users access level.
- Loading branch information
Showing
3 changed files
with
125 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters