Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot push to protected branch #619

Open
guilhermejcgois opened this issue Nov 10, 2022 · 5 comments
Open

Cannot push to protected branch #619

guilhermejcgois opened this issue Nov 10, 2022 · 5 comments

Comments

@guilhermejcgois
Copy link

We're having trouble to push back the commit generated by version executor due to our rules configured to protect the main branch. I have dig in the last two days but doesn't found a way to make this work without removing the protection. Does anyone face this same issue? We've another (not a nx workspace) project using semantic-release and works fine... Also, looking into semantic-release cli, they do some work on repo url to properly authenticate.

Our relevant targets config:

    "version": {
      "executor": "@jscutlery/semver:version",
      "options": {
        "preset": "conventional",
        "push": true,
        "postTargets": [
          "website:github"
        ]
      },
      "dependsOn": ["export"]
    },
    "github": {
      "executor": "@jscutlery/semver:github",
      "options": {
        "tag": "${tag}",
        "notes": "${notes}"
      }
    }

Related discussions in other projects:

@stefanellid-mms
Copy link

Hi,

did you find any solution or workaround for this issue?

Regards.

@guilhermejcgois
Copy link
Author

We still haven't found a solution yet... By now, we've removed the protection in the branch

@kaiivoschneider
Copy link

That is a Github related issue I think. The approach here would be to create a bot user account for your organisation, then create a PAT for that bot account. In the repositories branch protection settings you can give the bot permission to push to a protected branch and then use the PAT as authentication in your Github workflow.

@guilhermejcgois
Copy link
Author

@abbudao

@mklueh
Copy link

mklueh commented Dec 17, 2022

Having the same issue even after unprotecting my branch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants