Windows style line endings in git checkout

TeamCity apparently checks out source code for the build using Unix style line endings.  The checked in source has Unix style line endings, but the build requires Windows style line endings.  The git installation on both the web server and the build agent has the config setting core.autocrlf=true, but the build agent appears to somehow be ignoring or overriding it.

How can I get Windows style line endings on the build agent check outs?

4 comments
Comment actions Permalink

Hi Andrew,
unfortunately it is not possible to get correct line-endings with server-side checkout, this functionality is not implemented in jgit library yet. I created an issue you can watch/vote for (http://youtrack.jetbrains.net/issue/TW-16530).
You can get a correct line-endings using agent-side checkout. On agents we use a native git which respects core.autocrlf config parameter, please try it. Make sure you set this parameter in the .gitconfig file of the user who runs an agent.

0
Comment actions Permalink

The workaround you suggest -- agent side checkout -- is problematic. We don't want to use anonymous for obvious reasons. We have a score of agents. Configuring git, with ssh keys for each, would be prohibitively time consuming.

Could you support HTTP authentication on agents?

Note that the jgit problem is marked resolved.

0
Comment actions Permalink

Hi Cliff,

unfortunately, http authentication on agent isn't implemented yet either, please watch/vote for http://youtrack.jetbrains.com/issue/TW-18711.

0
Comment actions Permalink

Hi Cliff,

I've implemented http authentication on agents. You can download a build of git-plugin here http://teamcity.jetbrains.com/viewType.html?buildTypeId=bt395&tab=buildTypeStatusDiv, its number is #snapshot-18. To install it, put the zip into .BuildServer/plugins and restart the server.

0

Please sign in to leave a comment.