git是分布式的代码管理工具,远程的代码管理是基于ssh的,所以要使用远程的git则需要ssh的配置。

  github的ssh配置如下:

  一 、

  设置git的user name和email:

  $ git config --global user.name "xuhaiyan"

  $ git config --global user.email "haiyan.xu.vip@gmail.com"

  二、生成SSH密钥过程:

  1.查看是否已经有了ssh密钥:cd ~/.ssh

  如果没有密钥则不会有此文件夹,有则备份删除

  2.生存密钥:

  $ ssh-keygen -t rsa -C “haiyan.xu.vip@gmail.com”

  按3个回车,密码为空。

  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

  3.添加密钥到ssh:ssh-add 文件名

  需要之前输入密码。

  4.在github上添加ssh密钥,这要添加的是“id_rsa.pub”里面的公钥。

  打开https://github.com/?,登陆xuhaiyan825,然后添加ssh。

  5.测试:ssh git@github.com

  The authenticity of host ‘github.com (207.97.227.239)’ can’t be established.

  RSA key fingerprint is 16:27:ac:a5:76:28:2d:36:63:1b:56:4d:eb:df:a6:48.

  Are you sure you want to continue connecting (yes/no)? yes

  Warning: Permanently added ‘github.com,207.97.227.239′ (RSA) to the list of known hosts.

  ERROR: Hi tekkub! You’ve successfully authenticated, but GitHub does not provide shell access

  Connection to github.com closed.

  三、 开始使用github

  1.获取源码:

  $ git clone git@github.com:billyanyteen/github-services.git

  2.这样你的机器上就有一个repo了。

  3.git于svn所不同的是git是分布式的,没有服务器概念。所有的人的机器上都有一个repo,每次提交都是给自己机器的repo

  仓库初始化:

  git init

  生成快照并存入项目索引:

  git add

  文件,还有git rm,git mv等等…

  项目索引提交:

  git commit

  4.协作编程:

  将本地repo于远程的origin的repo合并,

  推送本地更新到远程:

  git push origin master

  更新远程更新到本地:

  git pull origin master

  补充:

  添加远端repo:

  $ git remote add upstream git://github.com/pjhyett/github-services.git

  重命名远端repo:

  $ git://github.com/pjhyett/github-services.git为“upstream”

ssh用于验证,https://github.com/?需要,https://www.cloudcontrol.com/onboarding/ssh也需要。...相关推荐

  1. Git 针对 GitLab Github 配置 HTTP HTTPS SSH 代理

    文章目录 配置 git 代理 配置 git 的 http https 代理 配置 git 的 ssh 代理 配置 git 代理 配置 git 的 http https 代理 Linux 和 Windo ...

  2. 中国软件杯——行人检测与跟踪(GitHub地址:https://github.com/dddlli/Swin-Transformer-Object-Detection-PaddlePaddle)

    中国软件杯--行人检测与跟踪(GitHub地址:https://github.com/dddlli/Swin-Transformer-Object-Detection-PaddlePaddle) 一. ...

  3. https://github.com/Trinea/android-open-project

    Android开源项目分类汇总 欢迎大家推荐好的Android开源项目,可直接Commit或在 收集&提交页 中告诉我,欢迎Star.Fork :) 微博:Trinea    主页:www.t ...

  4. unable to access ‘https://github.com/***.git‘: OpenSSL SSL_read: Connection was reset, errno 10054

    Git提交项目报错: unable to access 'https://github.com/***.git': OpenSSL SSL_read: Connection was reset, er ...

  5. Git报错解决:fatal: unable to access ‘https://github.com/...‘: OpenSSL SSL_read:..., errno 10054

    Git报错解决:fatal: unable to access 'https://github.com/-': OpenSSL SSL_read: Connection was reset, errn ...

  6. Caused by: hudson.plugins.git.GitException: Command “git fetch --tags --progress -- https://github.

    一.问题描述: 由于最近一直在搞java开发,没怎么搞cicd了,突然想搞搞自己的项目,所以跑了一下jenkins,却发现原来搭好的job执行失败,GitHub上面的代码拉不下来 ERROR: Err ...

  7. 解决GitHub连不上的问题fatal: unable to access ‘https://github.com/..’: Failed to connect to github.com port

    解决GitHub连不上的问题 fatal: unable to access 'https://github.com/dmlc/dgl.git': Failed to connect to githu ...

  8. netlify 部署 github page, 使用https域名

    原文链接: netlify 部署 github page, 使用https域名 上一篇: pr 输出 立体声 下一篇: js 区分鼠标左右键点击 netlify 官网 https://app.netl ...

  9. fatal: unable to access ‘https://github.com/xxx/123.git/‘: Failed connect to github.com:443 解决方案

    在linux上git clone时遇到 fatal: unable to access 'https://github.com/xx/xx.git/': Failed connect to githu ...

最新文章

  1. textview 背景变形_西安昆明池桁架舞台背景搭建欢迎致电
  2. 【杂谈】裸辞一年后,分享一下我的心态
  3. JZOJ 5182. 【NOIP2017提高组模拟6.29】码灵鼠
  4. 一份对过去120年奥运数据的可视化分析报告
  5. 总线制和多线制示意图_主机总线线 总线制和多线制示意图
  6. 所有的service报红但不报错_从一个应用报错来看centos系统的/tmp目录自动清理规则...
  7. 通用的N-Tier模型合理么?
  8. Python官方文档学习心得(第四篇)
  9. 8.携程架构实践 --- 监控
  10. 14.企业应用架构模式 --- Web表现模式
  11. ClearCase四大功能详述
  12. java linux获取本机ip_Java 获取本机IP
  13. win10企业版 微软商店安装
  14. 如何生成王者荣耀、QQ飞车等游戏“空白名”、“重复名”等特殊名
  15. Unity-Live2d(鼠标拖拽触发动作变化)
  16. 抽象思维能力训练随感
  17. CG系统提交Java程序_Cg使用说明 第一章 介绍
  18. 汽车自适应巡航控制策略【CarSim/Simulink 仿真】
  19. 130 余个超实用网站
  20. android 触摸时震动,android触屏震动以及震动强度批改

热门文章

  1. 微信营销门槛之微信粉丝成本变化(绝对干货)
  2. 郑渊洁:从童话大王到微博大王
  3. 纯CSS3实现iOS7扁平化图标
  4. 打电话哪款蓝牙耳机好?打电话音质好的蓝牙耳机推荐
  5. LWN: 在Linux kernel里应用profile-guided optimization!
  6. [游戏技术] Stripper:source地图事件说明
  7. Windows10安装WDK
  8. 推荐一个好用的论文助手工具,不仅可以免费论文查重,还可以规范参考文献和一键规范论文格式,方便好用还免费。地址:www.bigan.net
  9. 基于工业级无线路由器的公共自行车租赁无线联网管理方案
  10. 1.0E-08=0.000000001