Unable to fetch from remote repository, some local refs could not be updated
Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Summary
Problem
In the Administration Page > Repositories
> Repository
a blue box is showing the following ERROR
:
1
Unable to fetch from remote repository: ssh://<GIT_USER>@<GIT_HOST>:7999/<PROJECT_NAME>/<REPOSITORY_NAME>.git - [error: unable to resolve reference refs/heads/release/v4.3.0: Not a directory, From ssh://<GIT_USER>@<GIT_HOST>:7999/<PROJECT_NAME>/<REPOSITORY_NAME>.git, ! [new branch] release/v4.3.0 -> release/v4.3.0 (unable to update local ref), error: some local refs could not be updated; try running, 'git remote prune ssh://<GIT_USER>@<GIT_HOST>:7999/<PROJECT_NAME>/<REPOSITORY_NAME>.git' to remove any old, conflicting branches]
Diagnosis
Running the git remote prune ssh://<GIT_USER>@<GIT_HOST>:7999/<PROJECT_NAME>/<REPOSITORY_NAME>.git
does not solve the problem.
Cause
This happens because the clone of the GIT Repository
in Fisheye/Crucible is not updated with the recent Branches
updates.
Solution
Resolution
Re-clone the GIT clone
from FishEye/Crucible:
Stop Fisheye/Crucible
Delete the <FISHEYE_INST>/var/cache/<REPO_NAME>
/clone
directoryStart Fisheye/Crucible
ℹ️ This will force Fisheye/Crucible to pull the recent changes from the Remote Repository and create a live copy of that Repository.
After this the problem should disappear from the Repositories Page
and the indexing will happen normally.
Was this helpful?