Agent side checkout on Mac agent - permissions denied

I'm trying to get agent side checkout using Git working on our Mac Mini agent.  The agent is working fine and connecting to TeamCity, but as soon as I start I build I get the following error:

[Step 1/1] Starting: /Users/buildservice/Documents/buildAgent/temp/agentTmp/custom_script5766796522917766925

[06:06:29][Step 1/1] in directory: /Users/buildservice/Documents/onkey/git/workmanager
[06:06:29][Step 1/1] /Users/buildservice/Documents/buildAgent/temp/agentTmp/custom_script5766796522917766925: line 1: ./build.sh: Permission denied
[06:06:29][Step 1/1] Process exited with code 126
[06:06:25][Step 1/1] Process exited with code 126
[06:06:29][Step 1/1] Step Build, Package and Deploy to HockeyApp (Command Line) failed
 

I'm trying changing the permissions on the agentTmp folder using chmod and even umask, but nothing seems to work.  How can I get this working?

0
3 comments
Avatar
Permanently deleted user

I'm still stuck with trying to get this work.  What must I do to get the permissions working on a Mac agent for Agent side checkout.  Every time that Git creates the checkout folder on the agent, I get the following error:

[20:31:30][Step 1/1] Starting: /Users/buildservice/Documents/buildAgent/temp/agentTmp/custom_script2694229637726207039
[20:31:30][Step 1/1] in directory: /Users/buildservice/Documents/buildAgent/work/3073c2f8430ff283
[20:31:30][Step 1/1] /Users/buildservice/Documents/buildAgent/temp/agentTmp/custom_script2694229637726207039: line 1: ./build.sh: Permission denied
[20:31:30][Step 1/1] Process exited with code 126
[20:31:30][Step 1/1] Process exited with code 126

How can I ensure that TeamCity build agent has the required permissions to execute the build.sh bash script after the Git repo is cloned from the Git repository onto the build agent?

 

0
Avatar
Permanently deleted user

Some further information,  I'm trying to execute a Command line build step, that is set to execute as follows:

./build.sh -t DeployiOS -c %env.Configuration% \
-platform=iPhone \
-buildTag=%env.BuildTag% \
-buildNumber=%env.AppVersionCode% \
-versionNumber=%env.VersionMajor%.%env.VersionMinor%.%env.VersionHotfix%

0
Avatar
Permanently deleted user

I've managed to eventually sort this out by adding a custom build step that gives permissions to the build.sh to execute

0

Please sign in to leave a comment.