How to add a remote to a repository with lfs?

喜你入骨 提交于 2019-12-06 07:29:12

I have the same problem, and this is a partial solution.

  1. Run a local dockerized lfs-server saving the data somewhere, e.g. /var/LFS/LOCAL/REPOSITORY/, change it as you like.

    docker run -d --rm -v /var/LFS/LOCAL/REPOSITORY/:/lfs -p 9999:9999 -t fjukstad/lfs-server

  2. Browse the management interface at http://127.0.0.1:9999/mgmt [admin/admin]

  3. Add a user and a password
  4. In your git directory, add the lfs url (you might want to remove the user/password, but it will keep asking you):

    git config lfs.url http://user:password@localhost:9999/

Problems:

  • This is not a per-branch config. Be sure that it does not affect other branches (this is my case: other branches point to a different server, so I risk missing files on such server).
  • Don't know how to add ssh keys. If you do, tell us.
  • The docker container should run permanently.
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!