Xcode cloud Git Push on a Workflow

Hello, I'm working on migrating my projects Xcode cloud and on specific release workflow i build a new version and after using agvtool i increment the version when all this finish i want to push the changes (aka version change) on git and make new tag also.

The version change and git part is done on ci_post_xcodebuild.sh

The issue that i have is an error on git git push --tags and git push :

remote: Write access to repository not granted. fatal: unable to access 'http://github.com/REPO_NAME_REDACTED.git/': The requested URL returned error: 403

From what i see on my account, Xcode cloud asks for this permissions :

  • Read access to code, metadata, and pull requests

  • Read and write access to checks and commit statuses

So no push permission.

Do you have any idea how to make this work ?

Thanks, Florin

Post not yet marked as solved Up vote post of AngryS Down vote post of AngryS
150 views

Replies

You should be able to push by using a specific user and its own personal token, from inside the script:

git push https://<User Name>:<Token>@github.com/<User Name>/<Your Repository>.git

https://stackoverflow.com/a/72591028/67397