当前位置:   article > 正文

【Gitee 大文件上传问题】_batch response: lfs only supported repository in p

batch response: lfs only supported repository in paid or trial enterprise.

::: tip 注意 大文件提交要在项目初始化之前处理

安装 lfs

 cd xxx #'xxx'是你本地仓库目录
# 只需执行一次即可开启lfs功能
 git lfs install

  • 1
  • 2
  • 3
  • 4

设置LFS要管理的文件类型

#因为我是pth模型文件过大,所以我的命令是*.pth,此处需要根据自己情况设定类型
 git lfs track "*.gz"

  • 1
  • 2
  • 3

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

 git add .gitattributes
 git commit -m '提交 .gitattributes 文件'
 git push origin master(如果提交不了,后面可以加一个-f)

  • 1
  • 2
  • 3
  • 4

上传大文件

 git add ./bigData #我的大文件全在bigData文件夹下,根据自己情况更改
 git commit -m "upload Models"
 git push origin master -f

  • 1
  • 2
  • 3
  • 4

报LFS错

第一种报错
# 错误
batch response: LFS only supported repository in paid or trial enterprise.
  • 1
  • 2
 rm .git/hooks/pre-push
 git push -u origin "master"
  • 1
  • 2
第二种报错
# 错误
WARNING: Authentication error: Authentication required: LFS only supported repository in paid enterprise.


  • 1
  • 2
  • 3
  • 4
git config lfs.https://gitee.com/{your_gitee}/{your_repo}.git/info/lfs.locksverify false

  • 1
  • 2

注: 命令中的{your_gitee}/{your_repo}是你的远程仓库地址,根据自己情况替换。

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/笔触狂放9/article/detail/953702
推荐阅读
相关标签
  

闽ICP备14008679号