gz-fenglang

linux配置远程Git仓库

一,安装git

  yum install git

 

二,在服务器(119.28.1.1)目录( /git )下创建一个裸仓库admin.git

  cd /git

  git clone --bare root@119.28.1.1:/git/admin.git

 

三,修改git配置文件来允许远程push代码,以下代码是不必要的

  1.找到配置文件

     /git/admin.git/config

  2.添加如下配置

    [receive]

    denyCurrentBranch = ignore

 

四,远程拉取代码

  git clone root@119.28.1.1:/git/admin.git

 

五,如果提示(password:),则输入119.28.1.1的登录密码即可

  

分类:

技术点:

相关文章:

  • 2021-11-04
  • 2021-08-08
  • 2022-12-23
  • 2021-10-18
  • 2021-08-16
  • 2021-05-23
  • 2022-12-23
  • 2022-01-02
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-11-09
  • 2022-01-07
  • 2021-09-24
  • 2021-11-01
  • 2022-12-23
相关资源
相似解决方案