无法克隆存储库(返回空文件夹) [英] Cannot clone repositories (returns empty folder)

查看:251
本文介绍了无法克隆存储库(返回空文件夹)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Bitbucket自托管服务器.

Bitbucket self-hosted server.

我们拥有过去可以克隆的存储库. 现在发生的事情是:克隆获取数据,最后我只有一个空文件夹,甚至没有.git/文件夹,什么也没有.

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.

  • 尝试了4个不同的帐户,其中一个是管理员.
  • 在Windows 10和Mac OS上尝试过.
  • 尝试了不同的存储库和项目.
  • 在命令行和Sourcetree中尝试过.
  • 我可以从其他服务器克隆.
  • 我可以执行git init/git remote add/git fetch等的组合,然后我将拥有(
  • 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 ../

推荐答案

我的猜测是您的服务器可用空间不足,并且正在运行

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.

您可以做一些事情:

  1. 升级到Bitbucket的固定版本(5.15.0、5.13.3、5.14.1或其他6+版本)
  2. 清理可用空间,以便有5 GB以上的可用空间.
  3. 通过在 $ BITBUCKET_HOME/shared/bitbucket.properties 文件中以字节为单位设置plugin.bitbucket-scm-cache.minimum.free.space=来降低缓存逐出阈值,例如plugin.bitbucket-scm-cache.minimum.free.space=2147483648设置为2GB
  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

实际上,我建议执行选项1 2.选项3是一种解决方法,而不是永久性的解决方案.

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

全面披露:我在Atlassian的Premier Support团队工作,并花了几年时间支持Bitbucket Server.

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

这篇关于无法克隆存储库(返回空文件夹)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆