Forced line endings on Bamboo Agent?


I've only recently started using Bamboo along with Bitbucket,  we have a scenario (however wrong it might be) that files need to be downloaded and run by the Bamboo agent on a Linux machine, but with CRLF endings.

I can't seem to get this to happen.

I've managed to change all the line endings in the files, and also create a .gitattributes file trying various options, but the files in question always end up downloading with a the linefeed (/n) only.

Is there a setting that can be placed within the bamboo agent to say how it should handle the files?  Does the gitattributes file only suggest how the file should be edited when changed, so it won't help when cloning the repo for tests?


Any ideas would be welcomed.



4 answers

If you are creating these files on Windows, check that you don't have core.autocrlf set to true. This setting changes text files from Windows to Linux line-endings during push and changes them back during pull.


Thank you, though I have checked that.  I realised the core.autocrlf entry wasn't actually set, so I set it to false just in case.

I then realised that the original upload of files may have previously been converted to whatever the default setting is.  So as an experiment, I recreated the repository (this is in the setup stage, so no one else is working on this data yet).  I created a .gitattributes file with

*    text eol=crlf

in it, and made sure everything was uploaded like this.

I cleared everything where the agent runs, so it's git repository was cloned afresh, but the same occurred, the files are still downloading with /n only.

I can't help but think I am missing something obvious here.

0 votes

Are you using native git (I mean do you have git capability defined in Bamboo)?

Thanks for this, you may be right.  I don't believe we are using native git, so could the built-in version not fully support this?  I can't get Git onto that machine for the moment, but I will see what I can do and if it makes a difference.  This at least makes more sense.  Thanks.

I know it has been a long time, but I finally got Git onto the machine.  I have no idea how to check if it is working though.
I added a line to the file...


I have no idea if that is correct.  I see what seems like hundreds of pages saying that you need native git, but none to say what that actually entails.

Also, this is a remote agent, I have no access to setting capabilities on the Bamboo server.


Anyway, if you haven't guessed, this hasn't changed what is happening.  Any more ideas?


Just to reiterate what we are doing - I upload files from a Windows machine, they are then downloaded onto the Agent which is Linux

Suggest an answer

Log in or Sign up to answer
Community showcase
Published 13 hours ago in Jira

How you can achieve compact and easy-to-maintain workflows in your JIRA( Server)

This approach requires you to have the JIRA administrative rights. The main aim of this article is to help you achieve an organized, easy-to-maintain workflows in your JIRA instance thereby, reducin...

136 views 0 0
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you