Nic*_*ach 5 git gitlab git-lfs
我有一个旧githost实例的存储库,我正在尝试将其迁移到gitlab.com.我使用他们的指示迁移,而是因为这个仓库使用LFS,我得到了一些错误,我无法弄清楚如何解决.这是我正在运行的命令
cd repo
git remote rename origin old-origin
git remote add origin git@gitlab.com:group/repo.git
git push -u origin --all
git push -u origin --tags
Run Code Online (Sandbox Code Playgroud)
以下是我从git第一个push命令获得的响应示例:
remote: GitLab: LFS objects are missing. Ensure LFS is properly set up or try a manual "git lfs push --all".
To https://gitlab.com/group/repo.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://gitlab.com/group/repo.git'
Run Code Online (Sandbox Code Playgroud)
我尝试了建议的命令(git lfs push --all),该命令无效.我也尝试过git lfs push origin master,结果如下:
Uploading LFS objects: 100% (29/29), 2.4 GB | 0 B/s, done
Run Code Online (Sandbox Code Playgroud)
我在Gitlab文档上找不到任何内容,所以我要求这个社区的帮助.谢谢!
编辑:我也尝试使用https而不是SSH repo origin,这没有任何区别.
我只是试图做你想做的事。
做了以下事情:
git clone git@github.com:g19fanatic/test_lfs.git cd test_lfs git lfs track *.bin yes "123456678" | head -c 1024000 > test.bin git add .git push origin master
git remote add gitlab git@gitlab.com:pauldibiase/lfs-test.gitgit lfs push --all gitlab
Locking support detected on remote "gitlab". Consider enabling it with: $ git config lfs.https://gitlab.com/pauldibiase/lfs-test.git/info/lfs.locksverify true git config lfs.https://gitlab.com/pauldibiase/lfs-test.git/info/lfs.locksverify true git lfs push --all gitlab
git push gitlab master
FIPS 模式已初始化
上传 LFS 对象:100% (1/1),1.0 MB | 0 B/s,完成
数物体:4个,完成。
增量压缩最多使用 16 个线程。
压缩对象:100% (3/3),完成。
写入对象:100% (4/4),416 字节 | 0 字节/秒,完成。
总计 4 个(增量 0),重复使用 0 个(增量 0)
发送至 git@gitlab.com:pauldibiase/lfs-test.git
- [新分支] master -> master
使用git --version=git version 1.8.3.1
使用git lfs --version=git-lfs/2.6.1 (GitHub; linux amd64; go 1.11.2; git dc072c3e)
尝试将您的实际分支推送到新的 gitlab 远程。
| 归档时间: |
|
| 查看次数: |
358 次 |
| 最近记录: |