Git 提交大文件提示 fatal: The remote end hung up unexpectedly
使用gitlab搭建的git server,如果直接使用http的方式去提交的话,提交小文件不会有问题,但是提交大文件时,会出错: fatal: The remote end hung up unexpectedly。
解决办法就是使用ssh提交。
windows下解决方法:
打开git bash
Step1:
ssh-keygen -t rsa -C "YOUREMAIL@DOMAIN.COM"#根据你的邮箱生成一个sshkey 生成成功后,在本地会保存一个私钥,然后将公钥放到gitlab上:
Step2:
cat ~/.ssh/id_rsa.pub
# ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC6eNtGpNGwstc.... 就是将ssh-rsa...一串代码粘贴到sshkeys中。 Step3:
修改git 的url为git@server:username/project.git
git remote set-url origin git@gitserver:USERNAME/PROJECT.git 然后再去提交,就可以成功了。 #############提交附件时,如果超过10M,会无法提交###################################
这样解决: 修改gitlab下的models/note.rb文件,将其中对文件大小的限制由10m修改为指定大小: vim /opt/gitlab-6.3.0-0/apps/gitlab/htdocs/app/models/note.rb
找到如下行:validates :attachment, file_size: { maximum: 10.megabytes.to_i }
将10修改为100M
validates :attachment, file_size: { maximum: 100.megabytes.to_i }
如果httpserver使用提nginx,则修改配置文件nginx.conf,在http中加入 client_max_body_size 50m, 这个值默认是1M。
如果http server使用的是apache,则修改配置文件httpd.conf,在最后一行加入指令:LimitRequestBody 2147483647
(RequestBody在byte为单位,上面的指令为允许最大上传2G的文件。
修改完成后,重启gitlab和httpserver即可生效。
Git 提交大文件提示 fatal: The remote end hung up unexpectedly的更多相关文章
- git提交报异常,fatal: The remote end hung up unexpectedly
转自:http://liucanwen.iteye.com/blog/2021601 早上提交代码到 oschina代码库时,报了这个错误: fatal: The remote end hung up ...
- git fatal: The remote end hung up unexpectedly 错误
使用git将本地项目添加到远程仓库报以下错误 $ git push -u origin master fatal: The remote end hung up unexpectedly | 11.0 ...
- git 推送出现 "fatal: The remote end hung up unexpectedly" 解决方案
本文转载于:https://blog.csdn.net/zcmain/article/details/76855595 https://blog.csdn.net/u012973744/article ...
- git push fatal: The remote end hung up unexpectedly
git push fatal: The remote end hung up unexpectedly git config http.postBuffer git gc --aggressive 不 ...
- ssh: Could not resolve hostname git.*****-inc.com : Temporary failure in name resolution fatal: The remote end hung up unexpectedly
问题出现的情景:使用git pull拉取开发的代码到测试服务器,报错: ssh: Could not resolve hostname git.****-inc.com : Temporary fai ...
- fatal: The remote end hung up unexpectedly
git push 的时候出错,提示: fatal: The remote end hung up unexpectedly 遇见几次了,原因是因为文件太大,把限制放宽就好了.命令: git confi ...
- Permission denied (publickey). fatal: The remote end hung up unexpectedly 解决办法
这两天学习git的时候,在本地创建了一个库,同时自己在GitHub上面也创建了一个库,照着廖老师的教程一步一步走到了push的环节突然出现了这样的错误: [zhangxiyu@localhost le ...
- Git - error: RPC failed; result=22, HTTP code = 401 fatal: The remote end hung up unexpectedly
在用Git管理代码版本时,用git push命令提交代码,提示: 有以下几个可能性: Git 版本过低.GitCafe 推荐使用的 Git 版本是 >= 1.7. $ git --version ...
- 【Mood-17】 github中在本地进行上传的时候出现ERROR: Repository not found. fatal: The remote end hung up unexpectedly
一开始出现这个错误的时候还感觉很奇怪,我明明在在本地中相应的库文件夹命令中输入: vim ./git/config 将文件中的 [remote “origin"]部分去掉!
随机推荐
- CSS笔记(七)列表
CSS 列表属性允许你放置.改变列表项标志,或者将图像作为列表项标志. 参考:http://www.w3school.com.cn/css/css_list.asp 实例: <html> ...
- Spring XML配置实现AOP
1: 首先我们要定义 配置成切面的类 package cn.gbx.example; import org.aspectj.lang.ProceedingJoinPoint; import org. ...
- MVC服务器前台提示
[HttpPost] public ActionResult AddMsg(MsgModel model) { string strSql = "insert into tbl_msg(ti ...
- Python学习(18)面向对象
目录 Python 面向对象 创建实例对象 Python内置类属性 Pyyhon对象销毁(垃圾回收) 类属性与方法 Python 面向对象 Python从设计之初就已经是一门面向对象的语言,正因为如此 ...
- Android 自定义对话框
Android实现自定义对话框效果: 核心代码: package com.example.diydialog; import android.os.Bundle; import android.app ...
- Python变量类型
Python变量类型 变量是存储在内存中的值,因此在创建变量时会在内存中开辟一个空间. 基于变量的数据类型,解释器会分配指定的内存,并决定什么数据可以被存储在内存中. 因此变量可以指定不同的数据类型, ...
- Object Pascal 运算符
Object Pascal 的运算符 运算符是程序代码中对各种类型的数据进行计算的符号,通常分为算数运算符.逻辑运算符.比较运算符和按位运算符. 1.算术运算符Object Pascal ...
- STM32学习笔记(二) 基于STM32-GPIO的流水灯实现
学会了如何新建一个工程模板,下面就要开始动手实践了.像c/c++中经典的入门代码"hello world"一样,流水灯作为最简单的硬件设备在单片机领域也是入门首推.如果你已经有了一 ...
- bzoj3529(莫比乌斯反演+离线+树状数组)
在你以为理解mobus的时候,苦苦想通过化简公式来降低复杂度时,这题又打了我一巴掌. 看来我并没有理解到acmicpc比赛的宗旨啊. 这么多次查询可以考虑离线操作,使用树状数组单点更新. /***** ...
- 转:浅谈C/C++中的指针和数组(一)
再次读的时候实践了一下代码,结果和原文不一致 error C2372: 'p' : redefinition; different types of indirection 不同类型的间接寻址 /// ...