I upgraded my Mac to 10.10.3 and Xcode to 6.3.1 yesterday; today I can\'t use git, codesign_allocate....and more.
`sh: line 1: 18421 Abort trap:
I struggled with this almost all afternoon and started to think it would be the end for me.
Hopefully I found a solution that might help other people. I started to wonder after I saw this error again and again :
sh: line 1: 18421 Abort trap: 6 /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -sdk /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.3.sdk -find codesign_allocate 2> /dev/null
codesign_allocate: error: unable to find utility "codesign_allocate", not a developer tool or in PATH
I took @sandy's answer and checked the different paths where I could find codesign_allocate. I got a pretty good hint after running both of these command:
$ /usr/bin/codesign_allocate
sh: line 1: 26890 Abort trap: 6 ...
$ /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/codesign_allocate
Usage: .../codesign_allocate -i input [-a
Thus I simply replaced my local /usr/bin/codesign_allocate with the one from xcode and that fixed all my problems.
sudo cp -r /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/codesign_allocate /usr/bin/
I hope this can help other people; good luck everybody.