I'm trying to setup an automated build server for an iPhone application. I'd like to be able to have nightly adhoc beta builds so that testers can follow the development.

I've setted up xcode successfully xcode to perform adhoc builds and I can also launch the build from the command line:

> 
> xcodebuild -configuration AdHoc -sdk iphoneos2.2 clean build
> 
> 
> 

The problem I'm having is that the following line doesn't work from a forked terminal (using nohup or screen) and failed with the following

> 
> CodeSign error: Code Signing Identity 'iPhone Distribution: XXXXX' does not match any code-signing certificate in your keychain. Once added to the keychain, touch a file or clean the project to continue.
> 
> 
> 

I've checked my environment variables in my shell and in nohup or screen and didn't found a clue.
I guess my problem is that the forked terminal can't access to the keychain but I have no clue on how to allow it.

Thanks for your help