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 https://docs.fastlane.tools/actions/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?

2 Likes

https://help.github.com/en/actions/automating-your-workflow-with-github-actions/authenticating-with-the-github_token#permissions-for-the-github_token

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.