zoukankan      html  css  js  c++  java
  • jenkins使用5----gi服务器搭建连接

    ♦安装git

    ♦服务器创建git用户

    [root@localhost home]# id git
    id: git:无此用户
    [root@localhost home]# useradd git
    [root@localhost home]# passwd git
    

     ♦服务器创建git仓库

    [root@localhost home]# mkdir -p data/git/gittest.git
    [root@localhost home]# git init --bare data/git/gittest.git
    [root@localhost home]# cd data/git/
    [root@localhost git]# chown -R git:git gittest.git/
    

    ♦可以创建项目(测试没做)

    ♦然后从linux git服务器上clone项目

    [root@localhost gittest]# git clone ssh://git@192.168.150.163/data/git/gittest.git/

    端口如果不是22

    [root@localhost gittest]# git clone ssh://git@192.168.150.163:2994/data/git/gittest.git/

    git@192.168.150.163's password:     git用户密码

    ♦jenkins调用git需要将jenkins的公钥传给/home/git/.ssh/authorized_keys文件里。将jenkins的私钥传到凭证里面

  • 相关阅读:
    psy & vr
    psy 2
    psy
    linux c中select使用技巧
    hostent h_addr_list
    gethostbyname() -- 用域名或主机名获取IP地址
    c_select 调用参数说明
    [NYOJ 737] 石子合并(一)
    [HDU 1059] Dividing
    [HDU 1789] Doing Homework again
  • 原文地址:https://www.cnblogs.com/charon2/p/10522256.html
Copyright © 2011-2022 走看看