Teamcity checking out Git repo with Capitalization branch name
Completed
Hi,
we have one teamcity server with multiple agents. we are only seeing this issue on one agent. When teamcity checked out the repo that defined in the VCS root, it is capitalizing some of the branches. let's say i have multiple release branches in the bitbucket repo like release/2.1, release/2.2 and so on. but teamcity checking out like below, with R uppercase in release.
remotes/origin/release/1.0
remotes/origin/release/1.1
remotes/origin/Release/2.1
remotes/origin/Release/2.10
remotes/origin/Release/2.11
remotes/origin/Release/2.12
we are running same git version on all agents and when I clone the same repo manually on the server it cloned as expected without capitalization. Any guidance on how to fix this issue?
Thank you,
Aj
Please sign in to leave a comment.
I am sorry. I created a post instead a request.
TeamCity does not alter branch name capitalization during checkout. I would assume that the branch names came either from the server (do you have locally installed BitBucket or a hosted install?), or there could be a manual tweak to amend local branch names while retaining their remote reference.
Could you please let me know if the affected agent OS is different from the rest? Is there anything specific about its Git client configuration?
Hi Fedor Rumyantsev,
Thank you for your reply. we are using bitbucket server running locally. There are no manual tweaking, all I am doing is simple checkout using VCS root. All agents are running windows server. but same Teamcity build configuration acting differently on different agents. I have tried updating git version to latest and reinstalling agent, either of them didn't work.
Thanks
Could you please check on the BitBucket server, your repository folder, if .git\refs\heads includes "release" or "Release" folder, that is, is the folder name capitalized or not? Generally speaking, Git client would try to preserve server branch name - so if "Release" is capitalized on server, that would hint to the issue root.
I don't have access to the git server but will request this info from systems team. But as said earlier on other windows server agents we don't have this issue. if BitBucket server has Capitalized release shouldn't behave same on all agent servers? and one other thing is we also have a branch called Release/2.2 in the BitBucket repo, so there will be a folder called Release in the BitBucket server.
Yes, normally we would see the same picture on every agent - meaning that either this agent is configured in a different way (albeit I could not find any option that would Git force to change capitalization of branch either), or there are some manual changes.
May I suggest to:
1) run "Clean sources on this agent" on Agent Summary tab for the affected agent;
2) at <agent_install_dir>/system/git, locate the local mirror of repository if it exists and remove the folder?
In case there were manual checkouts, this will ensure whole checkout folder is cleaned up and branch name should be copied over as expected (identical to the BitBucket data).