Fork me on GitHub

yum下载安装git服务

 

  • yum install git

 

安装成功后,配置 用户 邮箱信息

注:  youxiu326      github账号名称

    youxiu326@163.com    github账号对应邮箱

 

  • git config --global user.name "youxiu326"
  • git config --global user.email "youxiu326@163.com"

 

配置ssh公钥

 

 

查询公钥

 

  • cd ~/.ssh/
  • cat id_rsa.pub

 

将内容复制,并在登录github账号 在Settings->SSH and GPG keys->New SSH key

 

测试是否配置成功

 

  • ssh git@github.com

 

[root@lihui .ssh]# ssh git@github.com
Warning: Permanently added the RSA host key for IP address '13.229.188.59' to the list of known hosts.
PTY allocation request failed on channel 0
Hi youxiu326! You've successfully authenticated, but GitHub does not provide shell access.
Connection to github.com closed.

  

 

posted @ 2018-12-18 16:18  youxiu326  阅读(597)  评论(0编辑  收藏  举报