CentOS 6.7 Git Service Build and Tortoisegit Configuration connection

Source: Internet
Author: User


Cough ~ Several days did not write blog, these days are studying git, no way the company to abandon the SVN transfer station GIT, nonsense will not say, below we perform operation demonstration:


Environment: Previously built Redis-master server, the configuration of general-like ~

Tools: Tortoisegit, the legendary Little Turtle ~


1. Installation of development tools and dependency packages

[[Email Protected]_master ~]# yum groupinstall "Development tools" \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ "\ \ \ \ \ \ \ \ \) \ Install dependent package =====================[[email Protected]_master ~]# yum install curl-devel expat-devel gettext-devel Openssl-devel Zlib-devel Perl-devel

2. Install git

[[Email protected]_master ~]# yum install git

3. Create a git user

[[Email protected]_master ~]# useradd git\\ switch to git and make sure it's in the same location and username [[email protected]_master ~]# su-git[[email protected]_ Master ~]$ pwd/home/git[[email protected]_master ~]$ whoami git\\ view. If SSH is present, create your own [[email protected]_master ~]$ LS-  A... . bash_history. bash_logout. Bash_profile. BASHRC gitolite.tar.gz. ssh. viminfo

4. Get Git version installed

[[email protected]_master ~]$ git clone [[email  protected]_master ~]$ lsgitolite.tar.gz                 \\ because the download speed is really slow, I used the online server download and packaged to my own lab chicks  [[email  protected]_master ~]$ tar xf gitolite.tar.gz     \\ Unzip [[email  protected]_master ~]$ lsgitolite  gitolite.tar.gz========= Create user home directory and install Gitolite[[email  protected]_master ~]$ mkdir  $HOME/bin[[email protected]_master ~]$  $HOME/ gitolite/install -to  $HOME/bin[[email protected]_master ~]$ ls . bin/.:bin   gitolite  gitolite.tar.gzbin/:commands  gitolite  gitolite-shell   lib  syntactic-sugar  triggers  version  vref 

5. Configure Gitolite Administrator

[[Email protected]_master ~]$ ssh-keygen-t RSA \ \ This is the SSH key generation command, my side already has the direct use [[email protected]_master ~]$/home/git/bin /gitolite setup-pk. ssh/id_rsa.pub \ \ Use Administrator public key to install gitoliteinitialized empty Git repository In/home/git/repositories/gitol ite-admin.git/initialized Empty git repository in/home/git/repositories/testing.git/

6, build the Administrator warehouse Gitolite-admin

[[email protected]_master ~]$ git clone [email protected]: Gitolite-admininitialized empty git repository in /home/git/gitolite-admin/.git/the  authenticity of host  ' 127.0.0.1  (127.0.0.1) '  can ' t be established. rsa key fingerprint is 64:df:86:6c:e3:96:c3:52:80:a7:d8:af:27:4a:4c:80.are you  sure you want to continue connecting  (yes/no)?  yeswarning: permanently  added  ' 127.0.0.1 '   (RSA)  to the list of known hosts.remote:  counting objects: 6, done.remote: compressing objects: 100%  (4/4),  done.remote: total 6  (delta 0), reused 0  (delta 0) Receiving  objects: 100%  (6/6),  done. [[email protected]_master ~]$ lsbin  gitolite  gitolite-admin   GitolitE.tar.gz  projects.list  repositories 

7, understand Gitolite-admin warehouse configuration and Tortoisegit installation and key generation

[Email protected]_master ~]$ cd gitolite-admin/[[email protected]_master gitolite-admin]$ ls conf/keydir/. git/conf/: Gitolite.conf.git/:branches Config Description HEAD hooks index Info logs Objects Packed-refs Refskeydir/:id_rsa . pub


7.1. git file directory is automatically generated for GIT programs

7.2 conf Name, it's a configuration file.

7.3 Keydir name can also be seen in the file directory that holds the key

7.4 Tortoisegit installation and secret key generation

 

7.2==================== before modifying ============================[[email protected]_master gitolite-admin]$  cat conf/gitolite.conf repo gitolite-admin             \\, this is the definition of our 6th Build Manager Warehouse     RW+      =   id_rsa        \\ The Id_rsa is the id_ we used to install. Rsa.pub is also the account that we use to control, the name can be re-taken, such as according to the number of repo testing                    \\testing for project, the system automatically builds a test warehouse      RW+     =    @all             \\ the @all used the SVN know, this is an output group ===================== modified after ==============================[[email  protected]_master gitolite-admin]$ vim conf/gitolite.conf #############=====groups== ====##################   @dev_rw = sunshine         \\ my new user sunshinerepo  gitolite-admin    rw+     =   id_rsarepo  testing    rw+     =    @allrepo  dev     RW+     =    @dev_rw          \\ New Output Group
7.3==================== modified before ============================[[email protected]_master gitolite-admin]$ ls keydir/id_ rsa.pub \ \ Change the name we can customize, in the Conf configuration of the user is to remove the name after the pub ===================== modified ==============================[[email Pro Tected]_master gitolite-admin]$ ls keydir/id_rsa.pub sunshine.pub \ \ This key is generated using Tortoisegit Puttygen, the following describes


installation and key generation of 7.4 tortoisegit

Go to https://tortoisegit.org/download/website to download the corresponding version

Installation is the next step.


7.4.1 use Puttygen to generate the key, click Genetate

650) this.width=650; "Src=" Http://s3.51cto.com/wyfs02/M01/88/5F/wKiom1fzKETz9U32AABQDMyTeh0120.png-wh_500x0-wm_3 -wmp_4-s_4202587557.png "title=" 1.png "alt=" Wkiom1fzketz9u32aabqdmyteh0120.png-wh_50 "/>

7.4.2 Mouse Remember to move in the box below, otherwise you will wait for a long time to build, which is similar to our generation of Linux SSH build banging keyboard

650) this.width=650; "Src=" Http://s4.51cto.com/wyfs02/M02/88/5F/wKiom1fzKWLCmGvKAABnz2KXd4c774.png-wh_500x0-wm_3 -wmp_4-s_2288467792.png "title=" 2.png "alt=" Wkiom1fzkwlcmgvkaabnz2kxd4c774.png-wh_50 "/>



7.4.3

1. Enter sunshine after key comment

650) this.width=650; "Src=" Http://s4.51cto.com/wyfs02/M02/88/5B/wKioL1fzKfKwY7wSAACS_KUtsi8662.png-wh_500x0-wm_3 -wmp_4-s_2482438759.png "title=" 3.png "alt=" Wkiol1fzkfkwy7wsaacs_kutsi8662.png-wh_50 "/>

2. Copy the public key under the publicly box to our previous sunshine.pub in the Keydir directory

[Email protected]_master gitolite-admin]$ Cat Keydir/sunshine.pub Ssh-rsa aaaab3nzac1yc2eaaaabjqaaaqeagkgrcrspcje0o37svz0dqnct0ctyi9ogv8mmi9z00wsmumaq82gfdhc0xpvefcdzqfnm7bszlxgskef7/ w7p6p4dc0rciarcyaswd0sj1+16zqadarjfvzf5obzqny6osbakub/ls1fnl4w7ad1mq7wcavpxzpwvinb3gbzecfekuj42quqxju+/ mtvifipmevsjnsotcfug5shufl7d0dbngyhxofptpufks7ay/1de9jpu83jub+wkjw/vriimrxpahhvfz0w25b4cvs04tenzullxaa4hdsi/ cbeckzxyvdfdgtphtqivtmofjwhzzufcxgnlge4vfh1szp14ew== sunshine

3. Save to the directory we specified by clicking Save Private key

650) this.width=650; "Src=" Http://s4.51cto.com/wyfs02/M02/88/5B/wKioL1fzKfKwY7wSAACS_KUtsi8662.png-wh_500x0-wm_3 -wmp_4-s_2482438759.png "title=" 3.png "alt=" Wkiol1fzkfkwy7wsaacs_kutsi8662.png-wh_50 "/>



7.5 Execute the following command on the server side

[[email protected]_master gitolite-admin]$ git add conf/gitolite.conf               \\ add gitolite.conf to Staging area [[email  protected]_master gitolite-admin]$ git add keydir                             \\ add Keydir to Staging area [[Email protected]_master gitolite-admin]$ git commit  -m  " New add sunshine.pub key and conf/gitolite.conf "      \\ Submit and describe the content [Master 9d8a7e7]  new add sunshine.pub key and  conf/gitolite.conf committer: git <[email protected]_master. (none) >Your name and email address were configured automatically  Basedon your username and hostname.&nBsp Please check that they are accurate. you can suppress this message by setting them explicitly:     git config --global user.name  "Your name"                                  \\ initial price increase request to fill in the corresponding user name     git config - -global user.email [email protected]                            \\ Initial submission will require an email address if the identity used for this commit is wrong,  You can fix it with:    git commit --amend --author= ' Your name <[email protected]> '  2 files changed, 8 insertions (+),  0 deletions (-)  create mode 100644  Keydir/sunshine.pub[[email protected]_master gitolite-admin]$ git config --global  user.email  "[email protected]"         \\ global fill in user name [email  protected]_master gitolite-admin]$ git config --global user.name  " Sunshineboysfz "                     \\ Global fill in the email address [[email protected]_master gitolite-admin]$ git  push                                                              \\ withStep to Gitolite in the master to Counting objects: 10, done. Delta compression using up to 4 threads. compressing objects: 100%  (5/5),  done. writing objects: 100%  (6/6),  872 bytes, done. total 6  (delta 0), reused 0  (delta 0) remote: initialized empty  git repository in /home/git/repositories/dev.git/to [email protected]: Gitolite-admin   2de3dc5. 9d8a7e7  master -> master


7.6 Tortoisegit Connection Configuration

1. Create a new directory in the Windows directory (where you specify)

2. Mail the file, click Git clone

3, fill in the corresponding information, and in the loading Putty key Load 7.4.3 3rd, is the private key file that you keep. Finally click OK

650) this.width=650; "Src=" Http://s2.51cto.com/wyfs02/M01/88/5F/wKiom1fzLZjQFddqAABpt0QlKB0288.png-wh_500x0-wm_3 -wmp_4-s_2164226486.png "title=" 4.png "alt=" Wkiom1fzlzjqfddqaabpt0qlkb0288.png-wh_50 "/>

650) this.width=650; "Src=" Http://s4.51cto.com/wyfs02/M00/88/5B/wKioL1fzLkuB_PR3AABm9vd_rco822.png-wh_500x0-wm_3 -wmp_4-s_22675114.png "style=" Float:none; "title=" 4.png "alt=" Wkiol1fzlkub_pr3aabm9vd_rco822.png-wh_50 "/>

650) this.width=650; "Src=" Http://s3.51cto.com/wyfs02/M01/88/5B/wKioL1fzMETDByPsAADKhNVMrAs360.png-wh_500x0-wm_3 -wmp_4-s_2606494923.png "title=" 6.png "alt=" Wkiol1fzmetdbypsaadkhnvmras360.png-wh_50 "/>

At this point, Centos+tortoisegit+gitolite will be set up, in fact, the service build to see will, mainly used.



This article is from the "SUNSHINEBOYSZF" blog, make sure to keep this source http://sunshineboyszf.blog.51cto.com/12087328/1858685

CentOS 6.7 Git Service Build and Tortoisegit Configuration connection

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.