jenkinsci / jenkinsci/git-plugin

[JENKINS-48598] git/mercurial: Remote Repository URL in pipeline job won't be updated if changed through web interface

Open
#3,246 1 comment 0 reactions 0 assignees View on GitHub
component:git-plugin component:mercurial-plugin component:pipeline imported-jira-issue priority:major resolution:unresolved
Dominant language
Java
Stars
694
Forks
1.1k
Avg merge
1h 29m
Merged PRs (30d)
3

Description

Hi,

to reproduce the error you can do:



  1. Create a new Pipeline job

  2. In the job configuration, choose "Pipeline Script from SCM"

  3. Enter a existing git repository URL (and credentials if required) containing a Jenkinsfile

  4. Select "trigger from SCM and enter a time"

  5. Wait until job gets triggered  (I let the job fail on purpose by providing a incorrect Jenkinsfile, but for this issue I think this is irrelevant)

  6. After job got triggered go back to configuration page and change the repository URL (containing a different Jenkinsfile)

  7. Change the trigger and wait until job get triggered

  8. Now have a look at the query protocol. My protocol indicates that jenkins is still using the first repository:  

    ```
    > git.exe ls-remote -h git@​oldRepository.git # timeout=10
    Found 1 remote heads on git@​oldRepository.git
    ```

    The same seems to account for the other values entered through the web interface (Name and RefSpec).


---
Originally reported by airborne, imported from: git/mercurial: Remote Repository URL in pipeline job won't be updated if changed through web interface


  • status: Open
  • priority: Major
  • component(s): git-plugin, mercurial-plugin, pipeline
  • label(s): git, pipeline,, repository, scm, triaged-2018-11, trigger
  • resolution: Unresolved
  • votes: 0
  • watchers: 1
  • imported: 2025-12-02

Raw content of original issue

Hi,

to reproduce the error you can do:



  1. Create a new Pipeline job

  2. In the job configuration, choose "Pipeline Script from SCM"

  3. Enter a existing git repository URL (and credentials if required) containing a Jenkinsfile

  4. Select "trigger from SCM and enter a time"

  5. Wait until job gets triggered  (I let the job fail on purpose by providing a incorrect Jenkinsfile, but for this issue I think this is irrelevant)

  6. After job got triggered go back to configuration page and change the repository URL (containing a different Jenkinsfile)

  7. Change the trigger and wait until job get triggered

  8. Now have a look at the query protocol. My protocol indicates that jenkins is still using the first repository:  

     > git.exe ls-remote -h git@oldRepository.git # timeout=10
    
    Found 1 remote heads on git@oldRepository.git


    The same seems to account for the other values entered through the web interface (Name and RefSpec).



  • environment: Windows 64 Bit, Jenkins 2.73.3, git plugin version 3.6.4,pipeline version 2.5. winstone servlet, jdk1.8.0_31

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.