NAS创建git服务器

网友投稿 654 2022-11-15

NAS创建git服务器

NAS创建git服务器

1.套件中心安装 GitServer

2.设置允许访问的用户(由于我使用的是root用户,因此这里设置限制不起作用)

3.新建一个共享空间,用来存放git仓库的位置。我这里设置了32GB.

4.使用超级终端登录到nas,然后创建一个本地git 仓库。

root@LsyDs918:/# cd volume1/root@LsyDs918:/volume1# lsgit_serverroot@LsyDs918:/volume1# cd git_server/root@LsyDs918:/volume1/git_server# ls@eaDir #recycleroot@LsyDs918:/volume1/git_server# ls@eaDir #recycleroot@LsyDs918:/volume1/git_server# ls@eaDir #recycleroot@LsyDs918:/volume1/git_server# mkdir CarSystem.gitroot@LsyDs918:/volume1/git_server# cd CarSystem.git/root@LsyDs918:/volume1/git_server/CarSystem.git# lsroot@LsyDs918:/volume1/git_server/CarSystem.git# git init --barehint: Using 'master' as the name for the initial branch. This default branch namehint: is subject to change. To configure the initial branch name to use in allhint: of your new repositories, which will suppress this warning, call:hint:hint: git config --global init.defaultBranch hint:hint: Names commonly chosen instead of 'master' are 'main', 'trunk' andhint: 'development'. The just-created branch can be renamed via this command:hint:hint: git branch -m Initialized empty Git repository in /volume1/git_server/CarSystem.git/root@LsyDs918:/volume1/git_server/CarSystem.git# lsbranches config description HEAD hooks info objects refsroot@LsyDs918:/volume1/git_server/CarSystem.git# cd ..root@LsyDs918:/volume1/git_server# lsCarSystem.git @eaDir #recycleroot@LsyDs918:/volume1/git_server# chown -R root:root CarSystem.git/root@LsyDs918:/volume1/git_server# chmod -R 770 CarSystem.git/

以上内容其实就是在linux下创建一个仓库。参考之前的链接:

​​(3条消息) Linux下搭建本地git服务器_Liu-Eleven的博客-CSDN博客_linux搭建git本地服务器​​

5.在局域网环境中其他机器上使用:

$ git clone ssh://root@192.168.1.123:223/volume1/git_server/CarSystem.gitCloning into 'CarSystem'...The authenticity of host '[192.168.1.123]:223 ([192.168.1.123]:223)' can't be established.ED25519 key fingerprint is SHA256:DlZbOwdBHVCtjECIJ5Fn1nWyhdM3COjxrYZmhwQ/pYI.This key is not known by any other namesAre you sure you want to continue connecting (yes/no/[fingerprint])? yesWarning: Permanently added '[192.168.1.123]:223' (ED25519) to the list of known hosts.root@192.168.1.123's password:warning: You appear to have cloned an empty repository.

版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。

上一篇:跟我学企业级flutter项目:简化框架demo参考
下一篇:聊聊springboot静态资源加载的规则
相关文章

 发表评论

暂时没有评论,来抢沙发吧~