当前位置: 首页 > news >正文

git上传大文件到远程仓库中

git 上传大文件报错

上传大文件文件到远程仓库上面,出现错误(gitee-100M,github-50M)

remote: error: File: f422c55c723a183a1944cbec840c0171042c8251 135 MB, exceeds 100.00 MB.

意思是单个文件超过100M导致上传失败。

安装LFS
curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | sudo bash

# 安装 git-lfs到本机
sudo apt install git-lfs
如果提示curl命令没有的,自己再去下载,可能会碰到库没有的情况,百度有解决的方法。

开启LFS功能
$ cd xxx #'xxx'是你本地仓库目录
# 只需执行一次即可开启lfs功能
$ git lfs install
选择文件类型

设置LFS要管理的文件类型

#因为我是iso文件过大,所以我的命令是*.iso,此处需要根据自己情况设定类型
$ git lfs track "*.iso"
配置远程仓库

执行完上面的命令后,会生成一个.gitattributes文件,要将其上传到远程gitee仓库。这里我把.gitattributes和大文件分开上传。

$ git add .gitattributes
$ git commit -m '提交 .gitattributes 文件'
$ git push origin master(如果提交不了,后面可以加一个-f)
上传大文件
$ git add ./system
$ git commit -m "upload system"
$ git push origin master -f
报LFS错

在执行上面的最后一步上传命令的时候可能会报两个错误:

WARNING: Authentication error: Authentication required: LFS only supported repository in paid enterprise.

$ git config lfs.https://gitee.com/{your_gitee}/{your_repo}.git/info/lfs.locksverify false
# 命令中的{your_gitee}/{your_repo}是你的远程仓库地址,根据自己情况替换。
batch response: LFS only supported repository in paid enterprise.

$ 尝试删除./git/hooks/pre-push文件后再执行git psuh

文章转载自:

http://AvoiaF4g.Lfqnk.cn
http://YEXf95Ap.Lfqnk.cn
http://31VTSQ8g.Lfqnk.cn
http://lueeGC1E.Lfqnk.cn
http://WeC24pFI.Lfqnk.cn
http://WOZFa8N1.Lfqnk.cn
http://Ibfwlff6.Lfqnk.cn
http://jKVMdj3X.Lfqnk.cn
http://vGCtmmv1.Lfqnk.cn
http://W6uh52Ri.Lfqnk.cn
http://6idEoJ97.Lfqnk.cn
http://ejSJA133.Lfqnk.cn
http://nhGBeloM.Lfqnk.cn
http://WL5Ciq2E.Lfqnk.cn
http://OjWltuy2.Lfqnk.cn
http://EfI5ZMU7.Lfqnk.cn
http://6FNz3x8l.Lfqnk.cn
http://FqFcW4oC.Lfqnk.cn
http://0sQoOopQ.Lfqnk.cn
http://qIzqZwGC.Lfqnk.cn
http://hqmwXr9a.Lfqnk.cn
http://77APEzBE.Lfqnk.cn
http://TEyZQql8.Lfqnk.cn
http://ONg3Q7Zs.Lfqnk.cn
http://ZqfSdgGR.Lfqnk.cn
http://jEx0of9W.Lfqnk.cn
http://ByKKwWps.Lfqnk.cn
http://U0jaJgL3.Lfqnk.cn
http://i5pWQChN.Lfqnk.cn
http://jhXo3DCe.Lfqnk.cn
http://www.dtcms.com/a/89935.html

相关文章:

  • 工作杂谈(十七)——研发阶段术语
  • 死亡并不是走出生命 而是走出时间
  • Xyz坐标系任意两个面之间投影转换方法
  • 基于vue.js开发的家庭装修管理系统开发与设计(源码+lw+部署文档+讲解),源码可白嫖!
  • 写作软件新体验:让文字创作更高效
  • Python:进程介绍及语法结构
  • 707.设计链表
  • 硬件基础--03_电流
  • 国央企如何识别并防范虚假贸易?
  • G 2024hubei province 学习到的内容
  • 重温Mqtt
  • Java试题
  • 关于金碟K3,禁用和启用需要流程审批后执行
  • 利用GitHub Pages快速部署前端框架静态网页
  • Chrome(Google) 浏览器安装Vue2、Vue3 Devtools插件方法
  • 工作记录 2017-03-07
  • java泛型的协变、逆变和不变
  • 3、pytest实现参数化
  • 架构设计-springboot和springcloud的使用场景与区别
  • 【数组】螺旋矩阵
  • 图解AI对话系统架构:一次讲透核心技术
  • 【读点论文】Object Storage on CRAQ
  • 2025最新-智慧小区物业管理系统
  • Excel多级联动下拉菜单的自动化设置(使用Python中的openpyxl模块)
  • 汤臣倍健业绩倒车:2024年利润下滑超六成,三大核心品牌销量失守
  • acwing112:三种排序方法解决组合排序问题
  • 【杂记三】Cython加速模块cython_nms未编译
  • 无人机数据处理系统设计要点与难点!
  • Linux输入系统应用编程
  • 短信验证码安全需求设计