How to run git command with GITHUB_TOKEN permission?

I have many git commands in my script. For example, I create git tag and try to push it to remote via fastlane push_git_tags

But I got permission denied problem. Is there a way I can use GITHUB_TOKEN for all my git command within the script?


The github token only has access to the repo the workflow is running on. If you want to do anything else you have to create your own token in your profile settings and set is as a secret in your repo settings.