Applies to:
- Liquibase Enterprise
Conditions:
- Jenkins
- Jenkin pipelines
Issue Summary:
Errors like the following are thrown when pulling data from Liquibase Enterprise projects:
10/21/2022 09:22:52 Getting latest revisions for 'ddb' 'git' working copy '.'
10/21/2022 09:22:53 ERROR: Error pulling the latest files from the 'ddb' repository
10/21/2022 09:22:53 ERROR: fatal: could not read Username for 'https://YOUR_SCM.com': No such device or address
Sometimes, the pipeline can work for some git operations, like pull or clone, but can fail to push or perform another git operation.
Error Message:
10/21/2022 09:22:53 ERROR: fatal: could not read Username for 'https://YOUR_SCM.com': No such device or address
Root Cause:
The "No such device or address" error message is most commonly caused by credential issues between Jenkins and Liquibase Enterprise project or git repositories:
- Bad credentials
- Bad credentials binding
Resolution:
Explicitly set the git username and password using Jenkins Credentials binding. The binding type must be gitUsernamePassword, as shown in the following example:
withCredentials([gitUsernamePassword(credentialsId: 'my-credentials-id',
gitToolName: 'git-tool')]) {
sh 'git fetch --all'
}
Existing git credentials must be set up in the Jenkins credentials configuration section.
The plugin will automatically bind the defined credentials into two environment variables which git uses to store credentials:
- GIT_USERNAME
- GIT_PASSWORD
Comments
0 comments
Article is closed for comments.