架设自己的git服务器
1.首先确保你的电脑能被ssh访问
1.1.apt-get install openssh -server
1.2.vi /etc/ssh/sshd_config :PermitRootLogin yes 可以ssh访问
1.3.service ssh restart
然后就可以直接访问
ssh 192.168.21.144
2.开启ssh授权
在本地的电脑用户(wit)上生成id_rsa.pub
scp id_rsa.pub root@192.168.21.144:/root/.ssh/authorized_keys
3.克隆代码
git clone root@192.168.21.144:/opt/git/test.git
git commit
git push origin master
4.开启gitweb服务器
首先需要安装:apt-get install lighttpd
git instaweb
类似:https://git.kernel.org/cgit/的效果
本文详细介绍如何在本地搭建Git服务器,包括SSH配置、授权设置、代码克隆与推送,以及安装和配置Gitweb服务器,实现代码的远程管理和浏览。
1577

被折叠的 条评论
为什么被折叠?



