I have Rake build script for my CI process running under TeamCity@windows. One of the steps that the script does is to commit some changes to remote repository (this repository represents real production environment on my shared hosting. It has only ftp access, so I map this location as a windows drive)
Part of ruby looks like this:
sh "git commit -v -m #{version_tag}"
However, when script is run by teamcity build agent (which runs under LocalSystem account), I get the following warning:
[master e7a5a8d] v0.4.7.0
Committer: unknown <SYSTEM@.(none)>
Your name and email address were configured automatically based
on your username and hostname. Please check that they are accurate.
You can suppress this message by setting them explicitly:
git config --global user.name "Your Name"
git config --global user.email you@example.com
If the identity used for this commit is wrong, you can fix it with:
git commit --amend --author='Your Name <you@example.com>'
9 files changed, 0 insertions(+), 0 deletions(-)
Reading what's written I altered my rake script command to:
sh "git commit --author='TeamCity <no@email.com>' -v -m #{version_tag}"
but this command results with a weird failure (previously commit was successful, but with warning). This is the only thing I get as an output from TeamCity build log:
git commit --author='TeamCity <no@email.com>' -v -m v1.0.18.10
[19:06:20]: [Execute _3_deployment_stage:to_ftp] The system cannot find the file specified.
How can I successfully set up an author for a commit for script running under LocalSystem account ?