zoukankan      html  css  js  c++  java
  • Android开发之Git配置

                                                        Android开发之Git配置

          

    1.首先git配置:

    输入命令:

             git config --global user.name "xxx.xx"

             git config --global user.email "xxx.xx@x.com"

             git config --global commit.template "/home/xxx/commit.template"

    名字改成自己的。

    可以通过git config --global --list查看命令是否配置:

    user.name=xxx.xx

    user.email=xxx.xx@x.com

    commit.template=/home/xxx/commit.template

    2.配置ssh:

    输入命令:

             ssh-keygen

    然后一路回车,结束后,到根目录下的.ssh文件夹中,

    输入命令:

             touch config

    新建config文件,添加下面内容:

    Host 192.168.10.x

    User xxx.xx

    Port 29418

    IdentityFile ~/.ssh/id_rsa

    Host 192.168.10.xx

    User xxx.xx

    Port 29418

    Hostname 192.168.10.xx

    IdentityFile ~/.ssh/id_rsa

    Host 192.168.10.xxx

    User xxx.xx

    Port 29418

    Hostname 192.168.10.xxx

    IdentityFile ~/.ssh/id_rsa

    不要忘记修改User。

    将id_rsa.pub中的全部内容拷贝到gerrit上,上述三个服务器都要添加SSH Public Keys。在浏览器上输入Host后面的地址登录服务器,如果服务器上没有账号注册一个。

    SSH Public Keys位置在setting中:

    点击add key,将复制的内容拷贝进来,如下:

    点击add就ok了。

    回到服务器,repo代码的时候会出现提示,输入yes回车即可。

  • 相关阅读:
    hdu 1873 看病要排队
    母函数详解
    【RDMA】无损网络和PFC(基于优先级的流量控制)
    图解Linux网络包接收过程
    结对编程 <==> 断背山?
    CMPP和SMPP协议比较
    Berkerly DB、SQL Server的性能比较
    使用Berkeley DB遇到问题了
    重新学习C语言
    超长短信的处理办法
  • 原文地址:https://www.cnblogs.com/cxqd/p/5893969.html
Copyright © 2011-2022 走看看