当我在我的共享主机上使用1and1执行git push remotename branchname
到我的远程仓库时,会出现以下错误信息:
Counting objects: 7, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (5/5), done.
Writing objects: 100% (7/7), 688 bytes | 0 bytes/s, done.
Total 7 (delta 2), reused 0 (delta 0)
remote: fatal: Out of memory, realloc failed
我在远程git仓库的hooks中设置了post-receive,代码如下:
#!/bin/sh
git --work-tree=/absolute/path/to/remotedir --git-dir=/absolute/path/to/remotedir/live.git checkout -f
当我通过SSH连接到远程服务器并输入free
命令时,发现有足够的空闲内存(不确定这是否与我的问题有关):
total used free shared buffers cached
Mem: 12330360 11796336 534024 32080 25248 8553496
-/+ buffers/cache: 3217592 9112768
Swap: 270332 3552 266780
我的遥控器正在使用:
Debian 3.14.73-2~ui80+4
git version 2.1.4
我的本地使用的是:
OS X 10.11.2
git version 2.4.9 (Apple Git-60)
我真的不确定为什么会发生这种情况。任何帮助都将不胜感激!
编辑
当我在远程运行ulimit -a
时,我得到:
core file size (blocks, -c) 0
data seg size (kbytes, -d) unlimited
scheduling priority (-e) 1
file size (blocks, -f) unlimited
pending signals (-i) 16382
max locked memory (kbytes, -l) 64
max memory size (kbytes, -m) unlimited
open files (-n) 512
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
real-time priority (-r) 0
stack size (kbytes, -s) 8192
cpu time (seconds, -t) 1800
max user processes (-u) 42
virtual memory (kbytes, -v) 786432
file locks (-x) unlimited
ulimit -Hv
显示为 786432,当我发出ulimit -Sv unlimited
命令时,似乎没有任何变化。 - hot_barbara