Git常见问题笔记

Git常见问题笔记

提交error: RPC failed; curl 55 Send failure: Connection was aborted

  1. 详细提示:
Counting objects: 19,done.
Delta compression using up to 8 threads.
Compressing objects: 100% (19/19), done.
Writing objects: 100% (19/19),623.64 MIb | 30.61Mib/s,done.
Total 19 (delta 6),reused 0 (delta 0)
fatal: The remota end hung up unexpectedly
fatal: The remota end hung up unexpectedly
error: RPC failed; curl 55 Send failure: Connection was aborted
Everything up-to-date
  1. 可能的原因及处理方法:
    • 客户端git缓存值太小。在有.git目录的同级目录上执行git config http.postBuffer 5368709120命令,设置为5G。
    • 服务端超时时间太短。修改服务端的超时时间,默认好像是30,可设置为90。修改/home/appdata/gitlab/data/gitlab-rails/etc/unicorn.rb文件中的timeout值为90,然后重启gitlab
    • 服务器端压缩配置问题。修改/home/appdata/gitlab/data/.gitconfig,在[core]节点下,添加compression = -1,修改之后重启gitlab。说明:compression 是压缩的意思,从 clone 的终端输出就知道,服务器会压缩目标文件,然后传输到客户端,客户端再解压。取值为 [-1, 9],-1 以 zlib 为默认压缩库,0 表示不进行压缩,1…9 是压缩速度与最终获得文件大小的不同程度的权衡,数字越大,压缩越慢,当然得到的文件会越小。
    • 一次提交过多文件确实会出现提交失败的问题,一定要有耐心,如果上面的设置都已经做了,那么重复多次提交也就可以。

提示error: RPC failed; HTTP 413 curl 22 The requested URL returned error: 413 Request Entity Too Large

  1. 详细提示
Counting objects: 19,done.
Delta compression using up to 8 threads.
Compressing objects: 100% (98/98),done.
Writing objects: 100%(98/98),1.67 GiB | 33.15Mib/s,done.
Total 98 (delta 50),reused 0 (delta 0)
fatal: The remota end hung up unexpectedly
fatal: The remota end hung up unexpectedly
error: RPC failed; HTTP 413 curl 22 The requested URL returned error: 413 Request Entity Too Large
Everything up-to-date
  1. 原因
    Gitlab项目文件太大,被服务端拒绝。
  2. 处理
    修改服务端文件大小限制。修改gitlab.rb文件内容,将/home/appdata/gitlab/etc/gitlab.rb中的nginx[‘client_max_body_size’] 值改大一点。nginx['client_max_body_size'] = '1024m',此值根据自己的需求而定。修改完成后记得重启Gitlab。

提示 . git/index.lock’: File exists.

  1. 详细提示
warning: LF will be replaced by CRLF in Assets/ 70ZN- Model /Materials/70-40-C27. mat.
The file will have its original line endings in your working directory.
warning :
LF will be replaced by CRLF in Assets/ 70ZN- Model /Materials/Door .mat .
The file will have its original line endings in your working directory.
fatal: Unable to create
'F : /UnityProject/Git/project_ _unity/exhibitionHallClient/ . git/index.lock': File exists.
Another git
process seems to be running in this repository, e.g.
an editor opened by " git commit' . Please make sure all processes
are terminated then try again. If it still fails, a git process
may have crashed in this repository earlier:
remove the file manually to continue.
  1. 原因
    这是因为上一次提交出现问题,导致文件被锁。
  2. 处理
    到相应的目录下将index.lock文件删除即可。删除时,可能会提示文件正在被使用,请将Git及打开项目的idea先关闭掉,最好确保系统进程中已经不存在,再重新删除,最后重新提交代码。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值