"Error: Unable to fork: Not Found!" encountered with bump-formula-pr

Hello! I am trying to update the formula for PyInvoke with

brew \
  bump-formula-pr \
  --strict \
  --message="Update pyinvoke to 1.3.0 with brew bump-formula-pr" \
  --url="https://github.com/pyinvoke/invoke/archive/1.3.0.tar.gz" \
  --sha256="2cb989c037945be3c13ed92e2a955f5f6489a39dbbc8bd2ee8d5712b8fad135e"

This is the result

==> **replace /^ revision \d+\n(\n( head "))?/m with "\\2"**

==> **replace /https:\/\/github\.com\/pyinvoke\/invoke\/archive\/1\.2\.0\.tar\.g**

==> **replace "266003d33a8b3a565268e33aa0f9767b9441cf1476a20258f929768ee5acd390"**

Error: Unable to fork: Not Found!

Any thoughts? Thanks in advance!

What happens when you run hub fork?

I had to install hub.

> cd (brew --repository)
nwh@nwh-macbook /u/l/Homebrew> git status
On branch master
Your branch is up to date with 'origin/master'.

nothing to commit, working tree clean
> git remote 
origin
> hub fork
github.com username: nwh
github.com password for nwh (never stored): 
two-factor authentication code: 
Updating nwh
From https://github.com/Homebrew/brew
 * [new branch]          master     -> nwh/master
new remote: nwh
> git remote -v
nwh	git@github.com:nwh/brew.git (fetch)
nwh	git@github.com:nwh/brew.git (push)
origin	https://github.com/Homebrew/brew (fetch)
origin	https://github.com/Homebrew/brew (push)

After this, the bump-formula-pr command still resulted in Error: Unable to fork: Not Found!.

Did I miss a GitHub authentication step? I was trying to follow this and the last PR which updated PyInvoke.

Thanks,
Nick

I ended up following the manual instructions. In doing so, I created a fork for homebrew-core, which I did not have before. Had that existed, maybe the bump-formula-pr subcommand would have worked? Anyway, the PR is here. Thanks!

Yeah, normally it should work correctly with just the bump-formula-pr command, but in that case you needed to run hub fork in the $(brew --repo homebrew/core) repository. Glad to hear it worked out!

In case this is useful to other people, the Error: Unable to fork: Not Found!. error message when using bump-formula-pr was, in my case, caused by insufficient permissions for the personal Github token used by brew (from HOMEBREW_GITHUB_API_TOKEN).
After updating the token to give it public_repo permissions (so it can check my repos and see that I had a fork) it worked fine.