HomeiOS Developmentios - Xcodebuild throws 'Write permissions error' when construct with Jenkins CI...

ios – Xcodebuild throws ‘Write permissions error’ when construct with Jenkins CI throughout archive signing


Code :

def archive(xcode_path, archive_path):
    if os.path.exists(archive_path):
        shutil.rmtree(archive_path)
    subprocess.run([
        'xcodebuild',

        '-project',
        xcode_path,

        '-scheme',
        'Unity-iPhone',

        '-allowProvisioningUpdates',

        '-destination',
        'generic/platform=iOS',

        '-archivePath',
        archive_path,

        'archive',
    ])
cd $PROJ_PATH
/usr/bin/python3 ../ci/archive.py

Error:

error: Certificates set up failed: Putting in a certificates within the keychain failed (Error Area=DVTSecErrorDomain Code=-61 “Write permissions error.” UserInfo={NSLocalizedDescription=Write permissions error.}) (in goal ‘Unity-iPhone’ from venture ‘Unity-iPhone’)

error: No signing certificates “iOS Growth” discovered: No “iOS Growth” signing certificates matching workforce ID “********” with a non-public key was discovered. (in goal ‘Unity-iPhone’ from venture ‘Unity-iPhone’)

Contexts that I believe is expounded:

Xcode venture was constructed with unity2021.3.15.
Xcode venture provisioning profile is toggle with ‘Automated’.
Machine model: macOS Ventura 13.0.
Xcode model: Model 14.1 (14B47b).

Questions:
I even have 2 questions:

  1. Why is it throwing this error? My guess is that xcodebuild is making an attempt to replace system keychain, however the execution person does not have the authority.
  2. Why is it that I can execute this code from my terminal, however errors are thrown when execute from Jenkins script. Although I examine with ‘whoami’ & ‘echo $USER’, the person that Jenkins used to execute this python script is identical with my terminal. If the customers are the identical one, Should not the outcome be precisely the identical?

Observe up:
I do perceive that lots of people use guide signing and haven’t got all these issues. However I do wish to use computerized signing as a result of, why not? It ought to be as soon as finished all the time finished proper?

Large Thx in earlier

I attempted search through-out the web, however many solutions urged that I simply change to guide signing.

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments