Creating a remote server on a LAN instead of using Git Hub [closed]

↘锁芯ラ 提交于 2019-11-30 15:07:25

问题


Can I create my own remote server instead of using Git Hub?

i.e Can I make a remote server on LAN where 3 computers are sharing a drive on a network to do the collaborative work using Gitbash?


回答1:


There are several ways to do this

  1. Host internal repositories like Gitlab or Stash. This will be similar to services like BitBucket or GitHub
  2. If you want to have a simple service with SSH authentication - user3159253 has already answered that
  3. A very bare bones way is
    1. server: Create a bare repo: mkdir -p RepoName && git init RepoName --bare
    2. server: Start the git daemon: git daemon --base-path=$PWD/RepoName
    3. client:
      Add your remote: git remote add origin git://server.url.or.ip/RepoName
      or just clone it: git clone git://server.url.or.ip/RepoName



回答2:


Yes, you do. Actually you need a SSH-service and git would perfectly work over SSH. Since you're on Windows, see Setup a Git server with msysgit on Windows




回答3:


You can set up a remote repository and make it accessible through any of the protocols it supports. The AAA would be handled by the transport.



来源:https://stackoverflow.com/questions/21273826/creating-a-remote-server-on-a-lan-instead-of-using-git-hub

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!