jenkinsci / jenkinsci/git-plugin
[JENKINS-29689] Some environment variables are not expanded during git polling
- Dominant language
- Java
- Stars
- 694
- Forks
- 1.1k
- Avg merge
- 1h 29m
- Merged PRs (30d)
- 3
Description
When setting the git URL to include environment variables, specifically
```
${JOB_NAME}
```
, and "Force polling using workspace" disabled, then during SCM polling the environment variables are not evaluated correctly when evaluating ref-specs and branch-specs.
As a result, credentials are loaded to the git client using the unparsed URL, while when the git client is actually being run it uses the correct URL and fails to load the credentials.
---
Originally reported by
guss77, imported from: Some environment variables are not expanded during git polling
Raw content of original issue
When setting the git URL to include environment variables, specifically
${JOB_NAME}, and "Force polling using workspace" disabled, then during SCM polling the environment variables are not evaluated correctly when evaluating ref-specs and branch-specs.
As a result, credentials are loaded to the git client using the unparsed URL, while when the git client is actually being run it uses the correct URL and fails to load the credentials.
environment
```
OS: Ubuntu 14.04 64bit, Jenkins running in a docker running Ubuntu 14.04. Slaves running Ubuntu 14.04 64bit
Java: OpenJDK Runtime Environment (IcedTea 2.5.5) (7u79-2.5.5-0ubuntu0.14.04.2)
Jenkins version 1.620, running directly. Accessed through ELB
git-plugin version 2.4.0
git-client-plugin 1.18.0
```
Contributor guide
Assessment
This issue has not been assessed yet.