如何在局域网上创建远程服务器而不是使用GitHub? [英] How to create a remote server on LAN instead of using GitHub?
本文介绍了如何在局域网上创建远程服务器而不是使用GitHub?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我可以创建自己的远程服务器而不是使用GitHub吗?
Can I create my own remote server instead of using GitHub?
i.e是否可以在LAN上制作一个远程服务器,其中3台计算机共享网络上的驱动器以使用Gitbash进行协作?
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?
推荐答案
有几种方法可以做到这一点
There are several ways to do this
- 托管内部存储库,例如 Gitlab 或藏匿.这将类似于BitBucket或GitHub 之类的服务.
- 如果您想通过SSH身份验证获得简单的服务-user3159253已经回答了该问题
- 一种非常裸露的方法是
- Host internal repositories like Gitlab or Stash. This will be similar to services like BitBucket or GitHub
- If you want to have a simple service with SSH authentication - user3159253 has already answered that
- A very bare bones way is
- 服务器:创建裸仓库:
mkdir -p RepoName && git init RepoName --bare
- 服务器:启动git守护程序:
git daemon --base-path=$PWD/RepoName
- 客户:
添加您的遥控器:git remote add origin git://server.url.or.ip/RepoName
或只是克隆它:git clone git://server.url.or.ip/RepoName
- server: Create a bare repo:
mkdir -p RepoName && git init RepoName --bare
- server: Start the git daemon:
git daemon --base-path=$PWD/RepoName
- 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
这篇关于如何在局域网上创建远程服务器而不是使用GitHub?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文