In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-09 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces how to build a git server under Linux. It is very detailed and has a certain reference value. Interested friends must finish reading it!
Git is an open source distributed version control system for efficient and high-speed version management of projects ranging from very small to very large.
We will take Centos as an example to build a Git server.
1. Install Git$ yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel perl-devel$ yum install git
Next, we create a git user group and users to run the git service:
$groupadd git$ useradd git-g git2, create certificate login
Collect the public keys of all users who need to log in. The public keys are in the id_rsa.pub file. Import our public keys into the / home/git/.ssh/authorized_keys file, one line at a time.
If you do not have the file to create it:
$cd / home/git/$ mkdir .ssh $chmod 755 .ssh $touch .ssh / authorized_keys$ chmod 644.ssh / authorized_keys3, initialize the Git repository
First, we select a directory as the Git repository, assuming it is / home/gitrepo/runoob.git, and enter the command in the / home/gitrepo directory:
$cd / home$ mkdir gitrepo$ chown git:git gitrepo/$ cd gitrepo$ git init-- bare runoob.gitInitialized empty Git repository in / home/gitrepo/runoob.git/
The above command Git creates an empty repository, and the Git repository on the server usually ends with .git. Then, change the user of the warehouse to git:
$chown-R git:git runoob.git
4. Clone warehouse
$git clone git@192.168.45.4:/home/gitrepo/runoob.gitCloning into 'runoob'...warning: You appear to have cloned an empty repository.Checking connectivity... Done.
192.168.45.4 is the server ip where Git is located. You need to modify it to your own Git service ip.
This completes the installation of our Git server.
These are all the contents of the article "how to build a git server under Linux". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.