CentOS上Git伺服器的架設

2021-06-17 21:39:39 字數 1020 閱讀 9316

安裝完畢後,試一下,執行

[root@idndx git-1.7.5.4]# git –version

git version 1.7.5.4

說明安裝成功

下面我們來設定伺服器

1、先修改你的身份

[root@idndx git-1.7.5.4]# git config –global user.name 「dndx」(將這裡的「dndx」換成你的名字)

[root@idndx git-1.7.5.4]# git config –global user.email ***@gmail.com(同樣,替換成你的)

2、建立git使用者組

[root@idndx git-1.7.5.4]# groupadd git

3、新增乙個開發者帳號

[root@idndx git-1.7.5.4]# useradd -g git *** -p pass -s /usr/local/bin/git-shell(***是使用者名稱,pass是密碼)

4、建立乙個倉庫

[root@idndx dndx]# mkdir git.git

[root@idndx dndx]# cd git.git

[root@idndx git.git]# git init –bare

initialized empty git repository in /home/dndx/git.git/.git

[root@idndx git.git]# echo 『web project.』>version.txt

[root@idndx git.git]# git add version.txt

[root@idndx git.git]# git commit -m 「project init」

[master (root-commit) 7e54ac2] project init

1 files changed, 1 insertions(+), 0 deletions(-)

create mode 100644 version.txt

伺服器上架

一 伺服器上架所需部件 在隨機的導軌套件中包含以下物品 1 外軌 含內滑軌和外滑軌 2 根 2 內軌 2 根 3 導軌支架 4 片 4 固定用螺栓 16 個 5 固定用螺母 8 個 請您準備好12 套固定導軌支架用的螺栓和螺母 機櫃附帶 二 準備滑軌 滑軌由兩部分組成 外軌和內軌。其中外軌是一體設計...

CentOs上搭建git伺服器

centos上搭建git伺服器 首先安裝setuptools wget tar zxvf setuptools 0.6c11.tar.gz cd setuptools 0.6c11 python setup.py build python setup.py install 在伺服器 centos 上...

CentOs上搭建git伺服器

原文 首先安裝setuptools wget tar zxvf setuptools 0.6c11.tar.gz cd setuptools 0.6c11 python setup.py build python setup.py install 在伺服器 centos 上首先安裝git軟體 安裝g...