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"]部分去掉!
随机推荐
- [转]使用onclick跳转到其他页面/跳转到指定url
如果是本页显示可以直接用location,方法如下: ①onclick="javascript:window.location.href='URL'" ②onclick=" ...
- HIHO 线段树(单点)
#include <stdio.h> #include <string.h> #include <math.h> #include <iostream> ...
- Java中List、Collections实现梭哈游戏
package ch8; import java.util.*; /** * Created by Jiqing on 2016/11/27. */ public class ShowHand { / ...
- N-Queens II
Description: Follow up for N-Queens problem. Now, instead outputting board configurations, return th ...
- Android Volley和Gson实现网络数据加载
Android Volley和Gson实现网络数据加载 先看接口 1 升级接口 http://s.meibeike.com/mcloud/ota/cloudService POST请求 参数列表如下 ...
- JavaScript中Trim(),TrimStart(),TrimEnd()的实现
//去除字符串头尾空格或指定字符 String.prototype.Trim= function(c) { if(c==null||c=="") { var str= this.r ...
- 实例级别和类级别的static、构造函数、字段属性的简单介绍
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace 实例级别 ...
- 转:The Knuth-Morris-Pratt Algorithm in my own words
The Knuth-Morris-Pratt Algorithm in my own words For the past few days, I’ve been reading various ex ...
- Java Performance - 优化和分析Garbage Collection/垃圾收集
随着硬件的不断提升,Java Heap 越来越大,合理的垃圾收集调优变得愈发重要.下面介绍一些最佳实践: 注意: 下面不涉及 IBM AIX Java. 同时不介绍原理,仅仅是建议以及初始配置/最佳实 ...
- CentOS Linux iptables 防火墙
快速安装,配置,启动,检查 - 关闭 5002 - 5011 端口开放所有其它 yum install iptables iptables -F iptables -X iptables -Z ipt ...