美文网首页
Git 学习记录

Git 学习记录

作者: _风雨 | 来源:发表于2018-06-01 11:28 被阅读9次

Git 学习记录

设置Git的user name和email:
git config --global user.name "xuhaiyan"
git config --global user.email "haiyan.xu.vip@gmail.com"

Git SSH Key 生成步骤
Git分布式代码管理,基于SSH,所以要使用远程Git需要配置SSH

1.打开终端查看是否存在ssh密钥: cd ~/.ssh, 如果有没密钥则不会有此文件夹,有则备份删除
2.生成密钥:
Ssh-keygen -t rsa -C xxx@qq.com
按三个回车,密码为空
Your identification has been saved in /home/tekkub/.ssh/id_rsa.
Your public key has been saved in /home/tekkub/.ssh/id_rsa.pub.
The key fingerprint is:
最后得到两个文件: id_rsa 和 id_rsa.pub

  1. 添加密钥到ssh: ssh-add 文件名,需要之前输入的密码 (注意好多教程没有这一步,我这里添加后才能正确)
  2. 在github 上添加ssh密钥,打开上面获取的 id_rsa_pub,将里面的公钥复制添加到github ssh
  3. 测试: ssh git@github.com
    Hi tekkub! You’ve successfully authenticated, but GitHub does not provide shell access
    Connection to github.com closed

原文链接 Git SSH Key生成: https://blog.csdn.net/hustpzb/article/details/8230454
Github 创建分支链接 : https://blog.csdn.net/top_code/article/details/51931916
Git 常用命令: https://gist.github.com/akkias/6355816

相关文章

  • Git 学习记录

    Git 学习记录 设置Git的user name和email:git config --global user.n...

  • git学习记录

    git init创建git仓库 git add添加文件到仓库 git commit -m "xxx"提交文件到仓库...

  • git 学习记录

    1、git init :初始化所在目录为git仓库(在这个目录里,可以理解为一个虚拟的空间,.git文件隐藏存在,...

  • git 学习记录

    什么是git ,git是一个分布式版本控制工具 ,而svn 是 集中式 给当前的git仓库配置用户名和邮箱 配置用...

  • Git 学习记录

    Git作为项目管理工具,已经成为开发者首选。Git概念繁多,理解不清楚,还真不太好办事。现将这段时间学习使用Git...

  • git学习记录

    工作区{ } 版本库{ } git常用命令 多人协作

  • Git 学习记录

    git addgit commitgit statusgit loggit diffgit reloggit lo...

  • git学习记录

    2016-02-28 git --versiongit config --global user.name ***...

  • Git学习记录

    欢迎访问我的博客muhlenXi,该文章出自我的博客。 版权声明:本文为muhlenXi原创文章,转载请注明出处,...

  • 记录Git学习

    1.git简介 Workspace:工作区Index / Stage:暂存区Repository:仓库区(或本地仓...

网友评论

      本文标题:Git 学习记录

      本文链接:https://www.haomeiwen.com/subject/ozphsftx.html