Lesstep
GitHub · pull requests · creating · Checked November 22, 2026

GitHub: "Pull request creation failed. Validation failed: must be a collaborator"

GitHub's documentation does not quote this message. It documents two rules that refuse someone who is not a collaborator: a repository can let only collaborators create pull requests, and to open a pull request in a public repository you need write access to the head branch (in an organization's repository, membership of the organization). Two commands show which one applies, and the way around the second is to open the pull request from your own fork (GitHub's disabling pull requests and creating a pull request, checked November 22, 2026).

The two documented causes

In public reports the error comes up when someone who is not a collaborator tries to open a pull request in a project they do not own (GitHub Community discussions #121562 and jaegertracing #5346). In the first, the accepted answer was to fork the repository, push the branch to the fork and open the pull request from there.

To know before you write it whether you can open one: Pull Request Inbox for GitHub, a plugin for JetBrains IDEs, says before its dialog opens when pull requests are turned off for the repository, and the dialog says when only collaborators can create them.

Find out which one

Read the repository's setting and your own permission on it. pull_request_creation_policy is all or collaborators_only, and permissions shows what your account may do (GitHub's get a repository):

gh api repos/<owner>/<repo> --jq '{pull_request_creation_policy, has_pull_requests, permissions}'

The GitHub CLI prints your permission level as one word, such as READ or WRITE (the viewerPermission field of gh repo view):

gh repo view <owner>/<repo> --json viewerPermission

Open it from your fork

  1. Fork the repository on GitHub, then push your branch to the fork.
  2. Open the pull request with the head in your fork. In the browser, open your fork and use the Compare & pull request prompt.
  3. With the GitHub CLI, --head takes <user>:<branch>, which skips forking and pushing (GitHub CLI manual, gh pr create):
gh pr create --repo <owner>/<repo> --head <your-user>:<branch> --base <base-branch>

Through the REST API, send head as USER:BRANCH to POST /repos/<owner>/<repo>/pulls, with the original repository in the path. See pull request not created (422, 403) for the other 422 answers. If the repository is set to Collaborators only, a fork does not get around it.

Other things that stop a stranger's pull request

In the IDE

Pull Request Inbox for GitHub, a plugin by Lesstep for JetBrains IDEs 2024.1 or later, creates the pull request from a branch of the repository the project is in: it sends the branch name as head to that repository's pull request endpoint, so it does not open one from a fork's branch. Before the dialog it reads the repository's settings: when pull requests are turned off it says so and stops, and when the repository lets only collaborators create them, the dialog says that under the title (in an organization: the write, maintain or admin role). If the branch is not on GitHub yet, it offers the IDE's push dialog. For a pull request from a fork, use the browser or the command above. Creating a pull request in the IDE is Pro (US$1.50 a month, with a 30-day trial); the inbox, diffs and merge checks are free.

Get it on JetBrains Marketplace

GitHub is a trademark of GitHub, Inc.; IntelliJ IDEA is a trademark of JetBrains s.r.o. This page is not affiliated with or endorsed by GitHub, Inc. or JetBrains.

More: Pull requests turned off or limited in a repository · Pull request not created (422, 403) · Push to a pull request branch from a fork refused · Resource not accessible by personal access token · 日本語