In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article mainly introduces "the detailed steps of building the Git server". In the daily operation, I believe many people have doubts about the detailed steps of building the Git server. The editor consulted all kinds of materials and sorted out simple and easy-to-use methods of operation. I hope it will be helpful for you to answer the doubts about the detailed steps of building the Git server. Next, please follow the editor to study!
1. Install Git
We will take Centos as an example to build a Git server.
$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 git
2. 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_keys
3. 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.
At this point, the study on the "detailed steps to build a Git server" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!
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.