# Retagging in Git Repository

**URL:** <https://www.finalbuilder.com/forums/t/retagging-in-git-repository/7089>\
**Category:** Bugs\
**Tags:** investigating\
**Created:** [August 4, 2021, 8:31am UTC](https://www.finalbuilder.com/forums/t/retagging-in-git-repository/7089 "2021-08-04T08:31:16Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![msachtleber](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/m/df705f/32.png) [@msachtleber](https://www.finalbuilder.com/forums/u/msachtleber)\
**Post date:** [August 4, 2021, 8:31am UTC](https://www.finalbuilder.com/forums/t/retagging-in-git-repository/7089/1 "2021-08-04T08:31:16Z")

</div>

When delete an recreate a tag in a Git repository, continua sets this repository to error state and writes an error message like this:

> Repository
> 
> Cannot get changes for repository @link(2002, 822fafa8-b9b5-44bd-9fe3-1fb3710a59dd)[TTP-code-siemens-com]: Running ‘C:\Program Files\Git\cmd\git.exe’ with arguments “-c credential.helper= -c credential.helper=”!"D:\Programme\VSoft Technologies\ContinuaCI\Server\Continua.Git.CredentialsHelper.exe" --key 5782c043b3e81b25 --workdir "D:\Continua\Rc\822fafa8"" fetch --prune --all --dry-run" failed with return code 1 and error output: "Fetching origin
> 
> From [Sign in to your account](https://code.siemens.com/vicos/oc100/components/ttp)  
> ! [rejected] P\_TTP\_02.05.00\_RC04 → P\_TTP\_02.05.00\_RC04 (would clobber existing tag)  
> error: Could not fetch origin  
> "  
> When I reset the repository in continua, it changes back to green but when I start a build of the changed tag, continua still builds the old version.

I even logged in on the continua server and tried to delete the tag in the repository manually with the git command shell but no effect.

How can I get Continua to read the latest tags from git and forget the changed tags?

---

<div class="post-metadata">

**Author:** ![Sparky](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/sparky/32/10_2.png) [@Sparky](https://www.finalbuilder.com/forums/u/Sparky)\
**Post date:** [August 4, 2021, 9:47am UTC](https://www.finalbuilder.com/forums/t/retagging-in-git-repository/7089/2 "2021-08-04T09:47:54Z")

</div>

Hi Marc,

Thanks for reporting this. A similar issue was reported recently and we made a change to fix it. After a quick look at the code, I can see that there are two places where a git fetch could error due to a recreated tag. We will work on a fix for this tomorrow morning.

Meanwhile, resetting the repository on the Repositories page in the administration section should get you past the error.
