0
点赞
收藏
分享

微信扫一扫

NAS创建git服务器


1.套件中心安装 GitServer

NAS创建git服务器_linux

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

NAS创建git服务器_git_02

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

NAS创建git服务器_git_03

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

root@LsyDs918:/# cd volume1/
root@LsyDs918:/volume1# ls
git_server
root@LsyDs918:/volume1# cd git_server/
root@LsyDs918:/volume1/git_server# ls
@eaDir #recycle
root@LsyDs918:/volume1/git_server# ls
@eaDir #recycle
root@LsyDs918:/volume1/git_server# ls
@eaDir #recycle
root@LsyDs918:/volume1/git_server# mkdir CarSystem.git
root@LsyDs918:/volume1/git_server# cd CarSystem.git/
root@LsyDs918:/volume1/git_server/CarSystem.git# ls
root@LsyDs918:/volume1/git_server/CarSystem.git# git init --bare
hint: Using 'master' as the name for the initial branch. This default branch name
hint: is subject to change. To configure the initial branch name to use in all
hint: of your new repositories, which will suppress this warning, call:
hint:
hint: git config --global init.defaultBranch <name>
hint:
hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and
hint: 'development'. The just-created branch can be renamed via this command:
hint:
hint: git branch -m <name>
Initialized empty Git repository in /volume1/git_server/CarSystem.git/
root@LsyDs918:/volume1/git_server/CarSystem.git# ls
branches config description HEAD hooks info objects refs
root@LsyDs918:/volume1/git_server/CarSystem.git# cd ..
root@LsyDs918:/volume1/git_server# ls
CarSystem.git @eaDir #recycle
root@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.git
Cloning 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 names
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: 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.

NAS创建git服务器_大数据_04

 

举报

相关推荐

0 条评论