Reputation: 21
I've got a git repo with many large files that I need to access from my personal laptop and my AWS EC2 instance. For institutional reasons I'm accessing the instance through AWS SSM, and working as sudo. I keep having issues with (1) pushing large files to remote from AWS, as well as (2) getting errors when running my code because on startup my large files get replaced with their pointers instead of the actual file. Here's my (perhaps technically challenged) summary of what I've done and tried:
remote: error: GH001: Large files detected. You may want to try Git Large File Storage - https://git-lfs.github.com.
remote: error: Trace: be4db70fb591a3183909102e8bbb8ba4
remote: error: See http://git.io/iEPt8g for more information.
remote: error: File deterministic/outputs/s_consequences_SCM6p5_AHRAO_b0_434.csv is 370.07 MB; this exceeds GitHub's file size limit of 100.00 MB
remote: error: File deterministic/outputs/s_consequences_SCM5p8_AHRAM_b0_421.csv is 154.72 MB; this exceeds GitHub's file size limit of 100.00 MB
remote: error: File deterministic/outputs/s_dmgbyasset_IDM6p8_JdFP_b0_17.csv is 155.28 MB; this exceeds GitHub's file size limit of 100.00 MB
remote: error: File deterministic/outputs/s_dmgbyasset_SCM5p8_AHRAM_b0_421.csv is 142.86 MB; this exceeds GitHub's file size limit of 100.00 MB
remote: error: File deterministic/outputs/s_dmgbyasset_SCM6p5_AHRAO_b0_434.csv is 335.78 MB; this exceeds GitHub's file size limit of 100.00 MB
remote: error: File deterministic/outputs/s_lossesbyasset_SCM5p8_AHRAM_b0_423.csv is 136.97 MB; this exceeds GitHub's file size limit of 100.00 MB
To https://github.com/PROJECT/oqREPO.git
! [remote rejected] tieganh -> tieganh (pre-receive hook declined)
error: failed to push some refs to 'https://github.com/PROJECT/oqREPO.git'
more .gitattributes
:ProjectMaterials/OQWorkshop_Montreal/EqRisk_Nov2019_THEdit.key filter=lfs diff=lfs merge=lfs -text
ProjectMaterials/OQWorkshop_Montreal/OQWorkshopTraining.key filter=lfs diff=lfs merge=lfs -text
*.csv filter=lfs diff=lfs merge=lfs -text
I'd really appreciate any help with this issue, either to fix my current repo or to help with reinstalling and moving to a new [clean] repo. For reference, I'm on Ubuntu 18.04 and the output of git lfs env
is:
git-lfs/2.3.4 (GitHub; linux amd64; go 1.8.3)
git version 2.17.1
Endpoint=https://github.com/PROJECT/oqREPO.git/info/lfs (auth=basic)
LocalWorkingDir=/root/storage/oqREPO
LocalGitDir=/root/storage/oqREPO/.git
LocalGitStorageDir=/root/storage/oqREPO/.git
LocalMediaDir=/root/storage/oqREPO/.git/lfs/objects
LocalReferenceDir=
TempDir=/root/storage/oqREPO/.git/lfs/tmp
ConcurrentTransfers=3
TusTransfers=false
BasicTransfersOnly=false
SkipDownloadErrors=false
FetchRecentAlways=false
FetchRecentRefsDays=7
FetchRecentCommitsDays=0
FetchRecentRefsIncludeRemotes=true
PruneOffsetDays=3
PruneVerifyRemoteAlways=false
PruneRemoteName=origin
LfsStorageDir=/root/storage/oqREPO/.git/lfs
AccessDownload=basic
AccessUpload=basic
DownloadTransfers=basic
UploadTransfers=basic
git config filter.lfs.process = ""
git config filter.lfs.smudge = ""
git config filter.lfs.clean = ""
Upvotes: 2
Views: 6186
Reputation: 76964
In order for Git LFS to work, you need to have the filter configuration properly set up with Git. The easiest way to do that is by running git lfs install
before you work with any Git LFS repositories.
If you have no configuration files, then you don't have the proper filter configuration set up, and Git LFS won't work. That's why you have the problems pushing: because Git LFS wasn't invoked by Git, and as a result you just stored the files in the repository as large Git files. Even if you could push them, they'd later on show as modified if you cloned the repository again.
You should make sure git lfs install
has been run and then run git lfs migrate import --everything
to fix this.
Upvotes: 3