Tôi có kho lưu trữ git nằm trên máy chủ có bộ nhớ hạn chế. Khi tôi cố gắng sao chép một kho lưu trữ hiện từ máy chủ tôi nhận được lỗi sauĐóng gói kho Git không thành công
[email protected]:$ git clone ssh://[email protected]/home/hemi/repos/articles
Initialized empty Git repository in /home/hemi/Skrivebord/articles/.git/
[email protected]'s password:
remote: Counting objects: 666, done.
remote: warning: suboptimal pack - out of memory
remote: fatal: Out of memory, malloc failed
error: git upload-pack: git-pack-objects died with error.
fatal: git upload-pack: aborting due to possible repository corruption on the remote side.
remote: aborting due to possible repository corruption on the remote side.
fatal: early EOF
fatal: index-pack failed
[email protected]:$
Để xử lý lỗi này tôi đã cố gắng để đóng gói lại các kho lưu trữ ban đầu (theo this forum post). Nhưng thay vì đóng gói lại kho lưu trữ, nó mô tả cách sử dụng lệnh "git pack-objects".
[email protected]:~/repos/articles$ git repack -a -d --window-memory 10m --max-pack-size 100m
usage: git pack-objects [{ -q | --progress | --all-progress }]
[--all-progress-implied]
[--max-pack-size=N] [--local] [--incremental]
[--window=N] [--window-memory=N] [--depth=N]
[--no-reuse-delta] [--no-reuse-object] [--delta-base-offset]
[--threads=N] [--non-empty] [--revs [--unpacked | --all]*]
[--reflog] [--stdout | base-name] [--include-tag]
[--keep-unreachable | --unpack-unreachable
[<ref-list | <object-list]
Git 1.6.5.7 được cài đặt trên máy chủ.
Cảm ơn các tùy chọn cấu hình, trước đây tôi không nhận thức được chúng. Kho lưu trữ chứa một tập hợp lớn các tệp pdf. Tổng kích thước của kho lưu trữ (bao gồm thư mục .git và các tệp được theo dõi) là xấp xỉ 1,1 GB. Vì vậy, tôi đoán đó là một kho lưu trữ lớn ;-) – midtiby
@MarkLongair: bạn đã cứu Sir của tôi! Tôi sắp chạy đến cửa hàng và mua một số nâng cấp RAM: D –
@MarkLongair: Câu trả lời tuyệt vời !!! Cảm ơn thông tin hữu ích như vậy – nish