jenkinsci / jenkinsci/git-plugin

[JENKINS-20736] Git plugin does not update origin if URL changes

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

Description

I ran into a slight issue. Within my job I had a post build step that conditionally adds a tag and pushes it to origin. That was working until we renamed our git repo and thus changing the URL. I changed the URL in the job config, but the pushing of the tag was failing. The reason was that origin was never updated to the new URL because the builds did not do a new clone and the git plugin does not rely on the origin remote.

Might be a good idea if the origin remote is updated to reflect the current URL.

The workaround is that I need to not rely on origin in my job.

---
Originally reported by dalewking, imported from: Git plugin does not update origin if URL changes


  • status: Open
  • priority: Minor
  • component(s): git-plugin
  • resolution: Unresolved
  • votes: 1
  • watchers: 2
  • imported: 2025-12-02

Raw content of original issue

I ran into a slight issue. Within my job I had a post build step that conditionally adds a tag and pushes it to origin. That was working until we renamed our git repo and thus changing the URL. I changed the URL in the job config, but the pushing of the tag was failing. The reason was that origin was never updated to the new URL because the builds did not do a new clone and the git plugin does not rely on the origin remote.

Might be a good idea if the origin remote is updated to reflect the current URL.

The workaround is that I need to not rely on origin in my job.

  • environment: Any

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.