zoukankan      html  css  js  c++  java
  • docker-git server

    *************************************
    *************************************
    ***********git *****************
    *****172.17.0.2:22*****************
    ****宿机192.168.157.128**************
    ******************************************************
    ****https://www.cnblogs.com/liter7/p/6581344.html
    ******************************************************
      12-1、docker run -it --privileged --name git   -p 30022:22  docker.io/centos:latest
                ##docker exec -it git  /bin/bash

      12-2、安装git
         yum -y install git    

      12-2、建裸仓库(以.git结尾)
        ####lestgit   
        cd /usr/local
        mkdir git
        cd git

        git init --bare testgit.git


      12-3、创git用户
          useradd git
          passwd git

      12-4、git用户权限
        chown -R git:git testgit.git


      12-5、禁git用户shell登录(*)
           vi /etc/passwd
         将git用户 如下(最后一行)
              git:x:1000:1000::/home/git:/usr/bin/git-shell


      12-6、 ###22端口###############     
            netstat -antp | grep sshd
            ssh localhost

      12-7、/usr/local/git

      12-8、宿机/客机

            ###宿机:   ssh  -p 22 root@172.17.0.2  
            ###客机:   telnet 192.168.157.128  30022

      12-9、####git#######
            默认端口22
            #############
              ##宿机git####
              #####git clone git@172.17.0.2:/usr/local/git/testgit.git    
            

                     ##客机git####非22端口
                          #####git clone ssh://git@192.168.157.128:30022/usr/local/git/testgit.git

    ###############################
    service: command not found
    #####service可用################
    1)、yum list | grep initscripts
     
       ##initscripts.x86_64

    2)、yum install initscripts -y






    ###############################
    ##############ssh###############
    1)、rpm -qa|grep -E "openssh"
    2)、yum install openssh*
    3)、service sshd start
    netstat -antp | grep sshd
    https://www.cnblogs.com/SciProgrammer/p/7818770.html

  • 相关阅读:
    Nim or not Nim? hdu3032 SG值打表找规律
    Maximum 贪心
    The Super Powers
    LCM Cardinality 暴力
    Longge's problem poj2480 欧拉函数,gcd
    GCD hdu2588
    Perfect Pth Powers poj1730
    6656 Watching the Kangaroo
    yield 小用
    wpf DropDownButton 源码
  • 原文地址:https://www.cnblogs.com/smallfa/p/13198189.html
Copyright © 2011-2022 走看看