Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Can't delete a remote repository

Edited

I tried to delete a remote repository, and it gave an error message:

An error occurred

Repository deletion was canceled.

  • Pull requests involving [MY_REPO_PATH] could not be cleaned up. The repository may not be deleted.

And it generated 2 error logs:

 

Is there any way to solve the issue?

The version is Atlassian Bitbucket v5.3.1 (Server) installed on Windows x64 system.

Thanks!

Chris

 

 

3 answers

Encountered this issue in Bitbucket 6.10.4 (running as a docker container on CoOS)

I managed to delete the repository after first deleting all PRs.

Hi @Ana Retamal, I don't use any external database for my Bitbucket Server. I use Internal database.

Here is the log if it can help:

 

2017-12-07 09:45:52,720 DEBUG [http-nio-7990-exec-6] cyao @1FID1NGx585x21268x0 w4exee 192.168.2.25 "DELETE /users/cyao/repos/delete HTTP/1.1" c.a.s.i.p.DefaultPullRequestService Deleted 0 pull request(s) TO repository 4
2017-12-07 09:45:52,720 DEBUG [http-nio-7990-exec-6] cyao @1FID1NGx585x21268x0 w4exee 192.168.2.25 "DELETE /users/cyao/repos/delete HTTP/1.1" c.a.s.i.s.g.p.DefaultPullRequestRefHelper RSV/remit-score-v2[3]:17@5: Using cached merge
2017-12-07 09:45:52,720 DEBUG [http-nio-7990-exec-6] cyao @1FID1NGx585x21268x0 w4exee 192.168.2.25 "DELETE /users/cyao/repos/delete HTTP/1.1" c.a.s.i.s.g.p.DefaultPullRequestRefHelper RSV/remit-score-v2[3]:17@5: Resolved effective diff from 836ffed61c63e214bad15a252b196c18903a1a05 to 5204f7042aa8d98fb8b402d681e0874647396a0c (BASE)
2017-12-07 09:45:52,720 DEBUG [http-nio-7990-exec-6] cyao @1FID1NGx585x21268x0 w4exee 192.168.2.25 "DELETE /users/cyao/repos/delete HTTP/1.1" c.a.s.i.p.DefaultPullRequestService Resolved up-to-date diff for RSV/remit-score-v2[3]/17
2017-12-07 09:45:52,735 DEBUG [http-nio-7990-exec-6] cyao @1FID1NGx585x21268x0 w4exee 192.168.2.25 "DELETE /users/cyao/repos/delete HTTP/1.1" c.a.s.i.s.g.p.DefaultPullRequestRefHelper RSV/remit-score-v2[3]:19@1: Resolving effective diff (280684e3abe242dcf61f61ab6d1dea616d909bf3 -> 5204f7042aa8d98fb8b402d681e0874647396a0c)
2017-12-07 09:45:52,735 DEBUG [http-nio-7990-exec-6] cyao @1FID1NGx585x21268x0 w4exee 192.168.2.25 "DELETE /users/cyao/repos/delete HTTP/1.1" c.a.s.internal.scm.git.RawGitAgent 3: Could not resolve refs/pull-requests/19/from directly or from packed-refs
2017-12-07 09:45:52,735 DEBUG [http-nio-7990-exec-6] cyao @1FID1NGx585x21268x0 w4exee 192.168.2.25 "DELETE /users/cyao/repos/delete HTTP/1.1" c.a.s.internal.scm.git.RawGitAgent 3: Could not resolve refs/pull-requests/19/merge directly or from packed-refs
2017-12-07 09:45:52,735 DEBUG [http-nio-7990-exec-6] cyao @1FID1NGx585x21268x0 w4exee 192.168.2.25 "DELETE /users/cyao/repos/delete HTTP/1.1" c.a.s.internal.scm.git.RawGitAgent 3: Could not resolve stash-refs/pull-requests/19/from directly or from packed-refs
2017-12-07 09:45:52,735 DEBUG [http-nio-7990-exec-6] cyao @1FID1NGx585x21268x0 w4exee 192.168.2.25 "DELETE /users/cyao/repos/delete HTTP/1.1" c.a.s.internal.scm.git.RawGitAgent 3: Could not resolve stash-refs/pull-requests/19/from directly or from packed-refs
2017-12-07 09:45:52,735 DEBUG [http-nio-7990-exec-6] cyao @1FID1NGx585x21268x0 w4exee 192.168.2.25 "DELETE /users/cyao/repos/delete HTTP/1.1" c.a.s.internal.scm.git.RawGitAgent 3: Could not resolve stash-refs/pull-requests/19/to directly or from packed-refs
2017-12-07 09:45:52,735 DEBUG [http-nio-7990-exec-6] cyao @1FID1NGx585x21268x0 w4exee 192.168.2.25 "DELETE /users/cyao/repos/delete HTTP/1.1" c.a.s.internal.scm.git.RawGitAgent RSV/remit-score-v2[3]: Repository is not empty
2017-12-07 09:45:52,735 DEBUG [http-nio-7990-exec-6] cyao @1FID1NGx585x21268x0 w4exee 192.168.2.25 "DELETE /users/cyao/repos/delete HTTP/1.1" c.a.s.i.s.g.p.ShinyGitPorcelain 3: Cloning to N:\Bitbucket\tmp\git\remit-score-v2-work1899599482581559412.git
2017-12-07 09:45:52,860 DEBUG [http-nio-7990-exec-6] cyao @1FID1NGx585x21268x0 w4exee 192.168.2.25 "DELETE /users/cyao/repos/delete HTTP/1.1" c.a.bitbucket.scm.BaseCommand Executed C:\Program Files\Git\cmd\git.exe clone --no-checkout --shared -b master N:\Bitbucket\shared\data\repositories\3 N:\Bitbucket\tmp\git\remit-score-v2-work1899599482581559412.git
2017-12-07 09:45:52,860 DEBUG [http-nio-7990-exec-6] cyao @1FID1NGx585x21268x0 w4exee 192.168.2.25 "DELETE /users/cyao/repos/delete HTTP/1.1" c.a.b.s.g.c.GitCommandExitHandler C:\Program Files\Git\cmd\git.exe clone --no-checkout --shared -b master N:\Bitbucket\shared\data\repositories\3 N:\Bitbucket\tmp\git\remit-score-v2-work1899599482581559412.git did not fail, but the following was written to stderr:
Cloning into 'N:\Bitbucket\tmp\git\remit-score-v2-work1899599482581559412.git'...
done.
2017-12-07 09:45:52,860 DEBUG [http-nio-7990-exec-6] cyao @1FID1NGx585x21268x0 w4exee 192.168.2.25 "DELETE /users/cyao/repos/delete HTTP/1.1" c.a.s.i.s.g.p.ShinyGitPorcelain 3: Resetting N:\Bitbucket\tmp\git\remit-score-v2-work1899599482581559412.git to clean the index
2017-12-07 09:45:52,923 DEBUG [http-nio-7990-exec-6] cyao @1FID1NGx585x21268x0 w4exee 192.168.2.25 "DELETE /users/cyao/repos/delete HTTP/1.1" c.a.bitbucket.scm.BaseCommand Executed C:\Program Files\Git\cmd\git.exe reset --quiet 5204f7042aa8d98fb8b402d681e0874647396a0c --
2017-12-07 09:45:52,923 DEBUG [http-nio-7990-exec-6] cyao @1FID1NGx585x21268x0 w4exee 192.168.2.25 "DELETE /users/cyao/repos/delete HTTP/1.1" c.a.s.i.scm.git.merge.MergeCommand RSV/remit-score-v2[3]: Merging ~CYAO/delete:refs/heads/chris-dev -> RSV/remit-score-v2:refs/heads/master in N:\Bitbucket\tmp\git\remit-score-v2-work1899599482581559412.git
2017-12-07 09:45:53,254 DEBUG [http-nio-7990-exec-6] cyao @1FID1NGx585x21268x0 w4exee 192.168.2.25 "DELETE /users/cyao/repos/delete HTTP/1.1" c.a.bitbucket.scm.BaseCommand Executed C:\Program Files\Git\cmd\git.exe merge -m Automatic merge --no-ff --log=20 --allow-unrelated-histories 280684e3abe242dcf61f61ab6d1dea616d909bf3
2017-12-07 09:45:53,286 INFO [http-nio-7990-exec-6] cyao @1FID1NGx585x21268x0 w4exee 192.168.2.25 "DELETE /users/cyao/repos/delete HTTP/1.1" c.a.s.i.s.g.p.DefaultPullRequestAutoMergeStrategy RSV/remit-score-v2[3]: Pull request 19@1 failed automatic merging
com.atlassian.bitbucket.scm.MergeException: The merge could not be completed automatically. Please clone 'RSV/remit-score-v2', checkout 'master' from 'RSV/remit-score-v2' and merge 'chris-dev' from '~CYAO/delete' (or commit '280684e3abe242dcf61f61ab6d1dea616d909bf3') manually, resolving any conflicts, and push the results.  

 

It seems like it is caused by failed merging, even though I already disabled Fork Syncing option. There is also a git-lfs error:



Caused by: com.atlassian.bitbucket.scm.CommandFailedException: 'C:\Program Files\Git\cmd\git.exe merge -m Automatic merge --no-ff --log=20 --allow-unrelated-histories 280684e3abe242dcf61f61ab6d1dea616d909bf3' exited with code 128 saying: Downloading Data/Processed/dataClean.h5 (37 MB)
Error downloading object: Data/Processed/dataClean.h5 (03b8a69): Smudge error: Error downloading Data/Processed/dataClean.h5 (03b8a69aec6c00e2f1e3b22bc787d0693cd8979244c23b79a3df6a55322fcb09): batch response: Post n:\Bitbucket\shared\data\repositories\3.git/info/lfs/objects/batch: unsupported protocol scheme "n"

Errors logged to N:\Bitbucket\tmp\git\remit-score-v2-work1899599482581559412.git\.git\lfs\objects\logs\20171207T094553.2440996.log
Use `git lfs logs last` to view the log.
error: external filter 'git-lfs filter-process' failed
fatal: Data/Processed/dataClean.h5: smudge filter lfs failed
0 votes
Ana Retamal Atlassian Team Dec 07, 2017

Hi Chris! We've seem some cases like this in the past, the solution was to grant temp permission to the database user.

It could be related to Cannot delete a bitbucket server repository

If that doesn't help, can you tell us which database are you using and check the logs for any error message?

Cheers!

Ana

@Ana Retamal, Thank you! But my Bitbucket Server is not connected to an external database. I use Internal database. And here I pasted the part of the log if any helps. Thank you! 

2017-12-07 09:45:52,720 DEBUG [http-nio-7990-exec-6] cyao @1FID1NGx585x21268x0 w4exee 192.168.2.25 "DELETE /users/cyao/repos/delete HTTP/1.1" c.a.s.i.p.DefaultPullRequestService Deleted 0 pull request(s) TO repository 4
2017-12-07 09:45:52,720 DEBUG [http-nio-7990-exec-6] cyao @1FID1NGx585x21268x0 w4exee 192.168.2.25 "DELETE /users/cyao/repos/delete HTTP/1.1" c.a.s.i.s.g.p.DefaultPullRequestRefHelper RSV/remit-score-v2[3]:17@5: Using cached merge
2017-12-07 09:45:52,720 DEBUG [http-nio-7990-exec-6] cyao @1FID1NGx585x21268x0 w4exee 192.168.2.25 "DELETE /users/cyao/repos/delete HTTP/1.1" c.a.s.i.s.g.p.DefaultPullRequestRefHelper RSV/remit-score-v2[3]:17@5: Resolved effective diff from 836ffed61c63e214bad15a252b196c18903a1a05 to 5204f7042aa8d98fb8b402d681e0874647396a0c (BASE)
2017-12-07 09:45:52,720 DEBUG [http-nio-7990-exec-6] cyao @1FID1NGx585x21268x0 w4exee 192.168.2.25 "DELETE /users/cyao/repos/delete HTTP/1.1" c.a.s.i.p.DefaultPullRequestService Resolved up-to-date diff for RSV/remit-score-v2[3]/17
2017-12-07 09:45:52,735 DEBUG [http-nio-7990-exec-6] cyao @1FID1NGx585x21268x0 w4exee 192.168.2.25 "DELETE /users/cyao/repos/delete HTTP/1.1" c.a.s.i.s.g.p.DefaultPullRequestRefHelper RSV/remit-score-v2[3]:19@1: Resolving effective diff (280684e3abe242dcf61f61ab6d1dea616d909bf3 -> 5204f7042aa8d98fb8b402d681e0874647396a0c)
2017-12-07 09:45:52,735 DEBUG [http-nio-7990-exec-6] cyao @1FID1NGx585x21268x0 w4exee 192.168.2.25 "DELETE /users/cyao/repos/delete HTTP/1.1" c.a.s.internal.scm.git.RawGitAgent 3: Could not resolve refs/pull-requests/19/from directly or from packed-refs
2017-12-07 09:45:52,735 DEBUG [http-nio-7990-exec-6] cyao @1FID1NGx585x21268x0 w4exee 192.168.2.25 "DELETE /users/cyao/repos/delete HTTP/1.1" c.a.s.internal.scm.git.RawGitAgent 3: Could not resolve refs/pull-requests/19/merge directly or from packed-refs
2017-12-07 09:45:52,735 DEBUG [http-nio-7990-exec-6] cyao @1FID1NGx585x21268x0 w4exee 192.168.2.25 "DELETE /users/cyao/repos/delete HTTP/1.1" c.a.s.internal.scm.git.RawGitAgent 3: Could not resolve stash-refs/pull-requests/19/from directly or from packed-refs
2017-12-07 09:45:52,735 DEBUG [http-nio-7990-exec-6] cyao @1FID1NGx585x21268x0 w4exee 192.168.2.25 "DELETE /users/cyao/repos/delete HTTP/1.1" c.a.s.internal.scm.git.RawGitAgent 3: Could not resolve stash-refs/pull-requests/19/from directly or from packed-refs
2017-12-07 09:45:52,735 DEBUG [http-nio-7990-exec-6] cyao @1FID1NGx585x21268x0 w4exee 192.168.2.25 "DELETE /users/cyao/repos/delete HTTP/1.1" c.a.s.internal.scm.git.RawGitAgent 3: Could not resolve stash-refs/pull-requests/19/to directly or from packed-refs
2017-12-07 09:45:52,735 DEBUG [http-nio-7990-exec-6] cyao @1FID1NGx585x21268x0 w4exee 192.168.2.25 "DELETE /users/cyao/repos/delete HTTP/1.1" c.a.s.internal.scm.git.RawGitAgent RSV/remit-score-v2[3]: Repository is not empty
2017-12-07 09:45:52,735 DEBUG [http-nio-7990-exec-6] cyao @1FID1NGx585x21268x0 w4exee 192.168.2.25 "DELETE /users/cyao/repos/delete HTTP/1.1" c.a.s.i.s.g.p.ShinyGitPorcelain 3: Cloning to N:\Bitbucket\tmp\git\remit-score-v2-work1899599482581559412.git
2017-12-07 09:45:52,860 DEBUG [http-nio-7990-exec-6] cyao @1FID1NGx585x21268x0 w4exee 192.168.2.25 "DELETE /users/cyao/repos/delete HTTP/1.1" c.a.bitbucket.scm.BaseCommand Executed C:\Program Files\Git\cmd\git.exe clone --no-checkout --shared -b master N:\Bitbucket\shared\data\repositories\3 N:\Bitbucket\tmp\git\remit-score-v2-work1899599482581559412.git
2017-12-07 09:45:52,860 DEBUG [http-nio-7990-exec-6] cyao @1FID1NGx585x21268x0 w4exee 192.168.2.25 "DELETE /users/cyao/repos/delete HTTP/1.1" c.a.b.s.g.c.GitCommandExitHandler C:\Program Files\Git\cmd\git.exe clone --no-checkout --shared -b master N:\Bitbucket\shared\data\repositories\3 N:\Bitbucket\tmp\git\remit-score-v2-work1899599482581559412.git did not fail, but the following was written to stderr:
Cloning into 'N:\Bitbucket\tmp\git\remit-score-v2-work1899599482581559412.git'...
done.
2017-12-07 09:45:52,860 DEBUG [http-nio-7990-exec-6] cyao @1FID1NGx585x21268x0 w4exee 192.168.2.25 "DELETE /users/cyao/repos/delete HTTP/1.1" c.a.s.i.s.g.p.ShinyGitPorcelain 3: Resetting N:\Bitbucket\tmp\git\remit-score-v2-work1899599482581559412.git to clean the index
2017-12-07 09:45:52,923 DEBUG [http-nio-7990-exec-6] cyao @1FID1NGx585x21268x0 w4exee 192.168.2.25 "DELETE /users/cyao/repos/delete HTTP/1.1" c.a.bitbucket.scm.BaseCommand Executed C:\Program Files\Git\cmd\git.exe reset --quiet 5204f7042aa8d98fb8b402d681e0874647396a0c --
2017-12-07 09:45:52,923 DEBUG [http-nio-7990-exec-6] cyao @1FID1NGx585x21268x0 w4exee 192.168.2.25 "DELETE /users/cyao/repos/delete HTTP/1.1" c.a.s.i.scm.git.merge.MergeCommand RSV/remit-score-v2[3]: Merging ~CYAO/delete:refs/heads/chris-dev -> RSV/remit-score-v2:refs/heads/master in N:\Bitbucket\tmp\git\remit-score-v2-work1899599482581559412.git
2017-12-07 09:45:53,254 DEBUG [http-nio-7990-exec-6] cyao @1FID1NGx585x21268x0 w4exee 192.168.2.25 "DELETE /users/cyao/repos/delete HTTP/1.1" c.a.bitbucket.scm.BaseCommand Executed C:\Program Files\Git\cmd\git.exe merge -m Automatic merge --no-ff --log=20 --allow-unrelated-histories 280684e3abe242dcf61f61ab6d1dea616d909bf3
2017-12-07 09:45:53,286 INFO [http-nio-7990-exec-6] cyao @1FID1NGx585x21268x0 w4exee 192.168.2.25 "DELETE /users/cyao/repos/delete HTTP/1.1" c.a.s.i.s.g.p.DefaultPullRequestAutoMergeStrategy RSV/remit-score-v2[3]: Pull request 19@1 failed automatic merging
com.atlassian.bitbucket.scm.MergeException: The merge could not be completed automatically. Please clone 'RSV/remit-score-v2', checkout 'master' from 'RSV/remit-score-v2' and merge 'chris-dev' from '~CYAO/delete' (or commit '280684e3abe242dcf61f61ab6d1dea616d909bf3') manually, resolving any conflicts, and push the results.

 

And

Caused by: com.atlassian.bitbucket.scm.CommandFailedException: 'C:\Program Files\Git\cmd\git.exe merge -m Automatic merge --no-ff --log=20 --allow-unrelated-histories 280684e3abe242dcf61f61ab6d1dea616d909bf3' exited with code 128 saying: Downloading Data/Processed/dataClean.h5 (37 MB)
Error downloading object: Data/Processed/dataClean.h5 (03b8a69): Smudge error: Error downloading Data/Processed/dataClean.h5 (03b8a69aec6c00e2f1e3b22bc787d0693cd8979244c23b79a3df6a55322fcb09): batch response: Post n:\Bitbucket\shared\data\repositories\3.git/info/lfs/objects/batch: unsupported protocol scheme "n"

Errors logged to N:\Bitbucket\tmp\git\remit-score-v2-work1899599482581559412.git\.git\lfs\objects\logs\20171207T094553.2440996.log
Use `git lfs logs last` to view the log.
error: external filter 'git-lfs filter-process' failed
fatal: Data/Processed/dataClean.h5: smudge filter lfs failed

 

2017-12-07 09:45:53,286 DEBUG [http-nio-7990-exec-6] cyao @1FID1NGx585x21268x0 w4exee 192.168.2.25 "DELETE /users/cyao/repos/delete HTTP/1.1" c.a.s.i.s.g.p.CommonAncestorPullRequestAutoMergeStrategy Fetching ~CYAO/delete:refs/heads/chris-dev into RSV/remit-score-v2[3] for cross-repository pull request 19@1
2017-12-07 09:45:53,364 DEBUG [http-nio-7990-exec-6] cyao @1FID1NGx585x21268x0 w4exee 192.168.2.25 "DELETE /users/cyao/repos/delete HTTP/1.1" c.a.bitbucket.scm.BaseCommand Executed C:\Program Files\Git\cmd\git.exe fetch N:\Bitbucket\shared\data\repositories\4 refs/heads/chris-dev:
2017-12-07 09:45:53,364 ERROR [http-nio-7990-exec-6] cyao @1FID1NGx585x21268x0 w4exee 192.168.2.25 "DELETE /users/cyao/repos/delete HTTP/1.1" c.a.s.i.p.DefaultPullRequestService ~CYAO/delete[4]: Pull requests could not be cleaned up on repository deletion
com.atlassian.bitbucket.scm.CommandFailedException: 'C:\Program Files\Git\cmd\git.exe fetch N:\Bitbucket\shared\data\repositories\4 refs/heads/chris-dev:' exited with code 128 saying: fatal: Couldn't find remote ref refs/heads/chris-dev
fatal: The remote end hung up unexpectedly

 

It seems like it caused by merging error even though I already disabled Fork Syncing option.

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Bitbucket

New improvements to user management in Bitbucket Cloud 👥

Hey Community! We’re willing to wager that quite a few of you not only use Bitbucket, but administer it too. Our team is excited to share that we’ll be releasing improvements throughout this month of...

3,713 views 10 16
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you