I'm cleaning up repositories that has a lot of jar files in it, and i'm using BFG repo-cleaner.
Also i'm using bitbucket server
- I cloned repo with mirror flag
- Made backup of repo
- Run cleanup
- run git reflog expire --expire=now --all && git gc --prune=now --aggressive as suggested
- run git push
and then git push fails and i get the following error:
Counting objects: 6057, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (2267/2267), done.
Writing objects: 100% (6057/6057), 7.94 MiB | 1.45 MiB/s, done.
Total 6057 (delta 2608), reused 6057 (delta 2608)
remote: Resolving deltas: 100% (2608/2608), done.
remote: Checking connectivity: 6057, done.
remote: You are attempting to update refs that are reserved for Bitbucket's pull request functionality. Bitbucket manages these refs automatically, and they may not be updated by users.
remote: Rejected refs:
remote: refs/pull-requests/34/from
remote:
! [remote rejected] develop -> develop (pre-receive hook declined)
! [remote rejected] feature/DEV-1599-date-formatting -> feature/DEV-1599-date-formatting (pre-receive hook declined)
! [remote rejected] feature/DEV-1608 -> feature/DEV-1608 (pre-receive hook declined)
! [remote rejected] feature/DEV-1785 -> feature/DEV-1785 (pre-receive hook declined)
! [remote rejected] feature/DEV-1818 -> feature/DEV-1818 (pre-receive hook declined)
! [remote rejected] feature/DEV-1836 -> feature/DEV-1836 (pre-receive hook declined)
! [remote rejected] feature/DEV-1839 -> feature/DEV-1839 (pre-receive hook declined)
! [remote rejected] feature/DEV-1845 -> feature/DEV-1845 (pre-receive hook declined)
! [remote rejected] feature/DEV-1936 -> feature/DEV-1936 (pre-receive hook declined)
! [remote rejected] hotfix/DEV-1872 -> hotfix/DEV-1872 (pre-receive hook declined)
! [remote rejected] jira6 -> jira6 (pre-receive hook declined)
! [remote rejected] jira_6_3_15 -> jira_6_3_15 (pre-receive hook declined)
! [remote rejected] master -> master (pre-receive hook declined)
! [remote rejected] refs/pull-requests/34/from -> refs/pull-requests/34/from (pre-receive hook declined)
! [remote rejected] 1.6.2 -> 1.6.2 (pre-receive hook declined)
! [remote rejected] v1.5.0 -> v1.5.0 (pre-receive hook declined)
! [remote rejected] v1.6.0 -> v1.6.0 (pre-receive hook declined)
! [remote rejected] v1.6.1 -> v1.6.1 (pre-receive hook declined)
error: failed to push some refs to
According to this two comments my problem is in opened pull-requests, and from error it seems like it's pull-request id is 34, but i have no open PR's and trying to find one with id 34 fails, there is no such PR.
So is there a way to health check PR refs or delete them or do something about thath? Or mb my problem is not even in PR