Cannot clone repositories (returns empty folder)

一个人想着一个人 提交于 2020-01-05 04:58:11

问题


Bitbucket self-hosted server.

We have repositories that we could clone in the past. Now what happens is: clone fetches data, and at the end I have just an empty folder, not even a .git/ folder, just nothing.

  • Tried with 4 different accounts, one of which is administrator.
  • Tried on Windows 10 and Mac OS.
  • Tried on different repositories and projects.
  • Tried from command line and from Sourcetree.
  • I can clone from other servers.
  • I can do a combo of git init / git remote add / git fetch etc. and then I will have (I hope) the equivalent of a cloned repo, and this way it works.

I can work (pull/push) on old repositories already cloned in the past on my computer, but cannot clone them again. Everything was working fine until few months ago.

a@a ~/PhpstormProjects/testClone
λ git clone https://www.myserver.com/bitbucket/scm/proj/repo.git
Cloning into 'repo'...
remote: Counting objects: 89, done.
remote: Compressing objects: 100% (79/79), done.
remote: Total 89 (delta 17), reused 0 (delta 0)
Unpacking objects: 100% (89/89), done.
a@a  ~/PhpstormProjects/testClone
λ ls -l
total 0
a@a ~/PhpstormProjects/testClone
λ ls -al
total 4
drwxr-xr-x 1 a 1049089 0 Feb 19 14:50 ./
drwxr-xr-x 1 a 1049089 0 Feb 19 14:48 ../

回答1:


My guess is you're running out of free space on the server and are running into BSERV-11132. tl;dr a conflict between Bitbucket's caching behaviour and its free space cache eviction behaviour causes it to generate the pack to send to the client, cache it, evict the cache, and serve you nothing. Bitbucket's cache eviction usually kicks in at 5GB so you must be running pretty low.

There are a few things you can do:

  1. Upgrade to a fixed version of Bitbucket (5.15.0, 5.13.3, 5.14.1, or anything 6+)
  2. Clear up free space so you have more than 5GB free.
  3. Lower the cache eviction threshold by setting plugin.bitbucket-scm-cache.minimum.free.space= in bytes in your $BITBUCKET_HOME/shared/bitbucket.properties file, e.g. plugin.bitbucket-scm-cache.minimum.free.space=2147483648 to set it to 2GB

Realistically I would recommend performing options 1 and 2. Option 3 is a workaround, and not a permanent solution.

Full disclosure: I work on Atlassian's Premier Support team and spent a couple of years supporting Bitbucket Server.



来源:https://stackoverflow.com/questions/54808016/cannot-clone-repositories-returns-empty-folder

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!