Locate the section for your Bitbucket Server remote in the .git/config
file. It looks like this:
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = git@<your repo url>
Now add the line fetch = +refs/pull-requests/*/from:refs/remotes/origin/pull-requests/*
to this section. Obviously, change the github url to match your project's URL. It ends up looking like this: