通过手册指导生产ssh key或取已有的ssh key

root@iZwz93telmwbh624e5zetqZ:~# ls -al ~/.ssh
total
drwx------ root root Jun : .
drwx------ root root Oct : ..
-rw------- root root Aug : authorized_keys root@iZwz93telmwbh624e5zetqZ:~# ssh-keygen -t rsa -b -C "249757247@qq.com"
Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa):
Enter passphrase (empty for no passphrase): #这里输入的是pull push密码
Enter same passphrase again:
Your identification has been saved in /root/.ssh/id_rsa.
Your public key has been saved in /root/.ssh/id_rsa.pub.
The key fingerprint is:
SHA256:sbLxozqlCHZcdyMqvwl2uEJffZ4q3xuDbKgAjaKxlAo @qq.com
The key's randomart image is:
+---[RSA ]----+
| |
| |
| . |
| o. . o = |
|Eoo . * S . |
|O= +.o+*.. |
|*oo=+=.+=o. |
| .+.Boo..+o |
| .o.==o.o. |
+----[SHA256]-----+
root@iZwz93telmwbh624e5zetqZ:~# ll /root/.ssh/
total
drwx------ root root Oct : ./
drwx------ root root Oct : ../
-rw------- root root Aug : authorized_keys
-rw------- root root Oct : id_rsa
-rw-r--r-- root root Oct : id_rsa.pub
root@iZwz93telmwbh624e5zetqZ:~# cat /root/.ssh/id_rsa.pub
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDEmUXTtV7IjNwAe7uOrDrhw+YCUMkO581+JjKG+5Sd6EPzHk0a+218aqP313PUG6yzy77ApPmK6unSgDX3+dN6FtIvJfLBbpGGS+2yuWj8XiyOI9neqU3irc9Haqy6P2K18/8GoSrLmpyfbVLuBEV9O4U62NtpM/YJAoQ00Pj7akJTkuQ1rLJ/9UVf6DGpEeyxwS+BKW0QRgnoCwDBwjcU0xQMSysEtWpYLtw36KqDBQDIdBYRqaqiYCm8U2DeaptkMtlsU2M92mPEE/GOzFlWttXfHhBCktfJRlyFysvFrEOUrZ9PLICFX4bW/eBEuGakGB3iqOwpRvvOoWSv7uaL0sc6x96XfTH3ks5LAJ6VKIvSjBw9BWlky+LGtammupqVKZJVV1WCJu5kp9B2FFUl1BdjtcUXEo6salfhmkXPPgAQF3OfqdrDN6KszijtNom0TVJCwTgtR/iW3etCNX25LRwV/zpfS2yrsAupqZf7fPRoxfRDjSynRaIK778+gLqhkRrWktw6nmxifZoeA7MjQ9pSBFkyqGY5pI4BQ3woRvjUp/BxyXIEGJNQeRrVx/pV+pCuDjwA0e4IXD0EhMQNLNp6Jeihl5cw+e/gUg0cPGf18BETZB52vZhzkdf7rVec/Fc8VLO4b5b/oVxcB2rI54N6hx89zfp5hjjKlzuDRw== 249757247@qq.com
root@iZwz93telmwbh624e5zetqZ:~#

root@iZwz93telmwbh624e5zetqZ:~# ssh -T git@github.com
The authenticity of host 'github.com (13.250.177.223)' can't be established.
RSA key fingerprint is SHA256:nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'github.com,13.250.177.223' (RSA) to the list of known hosts.
Enter passphrase for key '/root/.ssh/id_rsa':
Hi hnhycnlc888! You've successfully authenticated, but GitHub does not provide shell access.

root@iZwz93telmwbh624e5zetqZ:~# pwd
/root
root@iZwz93telmwbh624e5zetqZ:~# ls
download  dump.rdb  php_extension  telpo
root@iZwz93telmwbh624e5zetqZ:~# git clone https://github.com/hnhycnlc888/helloworld.git
Cloning into 'helloworld'...
remote: Enumerating objects: 3, done.
remote: Counting objects: 100% (3/3), done.
remote: Total 3 (delta 0), reused 3 (delta 0), pack-reused 0
Unpacking objects: 100% (3/3), done.
Checking connectivity... done.
root@iZwz93telmwbh624e5zetqZ:~# ls
download  dump.rdb  helloworld  php_extension  telpo
root@iZwz93telmwbh624e5zetqZ:~# ll helloworld/
total 16
drwxr-xr-x  3 root root 4096 Oct 25 01:46 ./
drwx------ 14 root root 4096 Oct 25 01:46 ../
drwxr-xr-x  8 root root 4096 Oct 25 01:46 .git/
-rw-r--r--  1 root root   13 Oct 25 01:46 README.md
root@iZwz93telmwbh624e5zetqZ:~# cat helloworld/.git/config
[core]
    repositoryformatversion = 0
    filemode = true
    bare = false
    logallrefupdates = true
[remote "origin"]
    url = https://github.com/hnhycnlc888/helloworld.git
    fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
    remote = origin
    merge = refs/heads/master
root@iZwz93telmwbh624e5zetqZ:~#

github配置和使用的更多相关文章

  1. window下配置SSH连接GitHub、GitHub配置ssh key

    window下配置SSH连接GitHub.GitHub配置ssh key   此经验分两部分: 第一部分介绍:在windows下通过msysGit(Git for windows.Git Bash)配 ...

  2. 跟我学SpringCloud | 第六篇:Spring Cloud Config Github配置中心

    SpringCloud系列教程 | 第六篇:Spring Cloud Config Github配置中心 Springboot: 2.1.6.RELEASE SpringCloud: Greenwic ...

  3. github配置及使用

    安装git 对于linux系统,不同发行版本的安装方法不一样,请参考https://git-scm.com/download/linux.以ubuntu为例: sudo add-apt-reposit ...

  4. github配置和git学习

    参考:http://www.eoeandroid.com/thread-272837-1-1.html http://blog.csdn.net/hcbbt/article/details/11651 ...

  5. ( 转 )Github配置

    以下转自 http://liuzhijun.iteye.com/blog/1457207 有问题请联系我删除. -----———————————————————————— 如果你的代码不知道放哪里好, ...

  6. window下配置SSH连接GitHub、GitHub配置ssh key(转)

    转自:http://jingyan.baidu.com/article/a65957f4e91ccf24e77f9b11.html 此经验分两部分: 第一部分介绍:在windows下通过msysGit ...

  7. ubuntu 14.0 下github 配置

    一:创建Repositories 1:首先在github下创建一个帐号.这个不用多说,然后创建一个Repositories. 2:然后在ubuntu下安装git相关的东东: 1 sudo apt-ge ...

  8. windows中使用Git工具连接GitHub(配置篇)

    Git在源码管理领域目前占很大的比重了,而且开源的项目很多都转到GitHub上面了.例如:jQuery, reddit, Sparkle, curl, Ruby on Rails, node.js,  ...

  9. 同一台电脑使用 gitlab 和 github 配置

    Git 客户端与服务器端的通信支持多种协议,ssh 最常用.ssh的公钥登录流程,用户将自己的公钥存储在远程主机,登录时,远程主机会向用户发送一条消息,用户用自己的私钥加密后,再发给服务器.远程主机用 ...

  10. github配置ssh密钥的方法

    配置用户名和邮箱 初次安装git需要配置用户名和邮箱,否则git会提示:please tell me who you are. 你需要运行命令来配置你的用户名和邮箱: $ git config --g ...

随机推荐

  1. beanstalkd 安装和配置

    安装 安装以centos为例 yum install beanstalkd 配置 使用centos yum安装,通过查看服务脚本发现有这个配置文件 cat /etc/sysconfig/beansta ...

  2. cmd 编码修改。 牛阿。 解决问题

    http://jingyan.baidu.com/article/e75aca85440f01142edac636.html 命令窗口修改编码,CMD编码修改方法 听语音 | 浏览:9696 | 更新 ...

  3. delphi 函数isiconic 函数 判断窗口是否最小化

    http://blog.sina.com.cn/s/blog_66357ab901012t2h.html delphi 函数isiconic 函数 判断窗口是否最小化 (2012-05-26 22:0 ...

  4. Centos 下更改MySQL源数据存放目录(datadir)

    MySQL在安装完成之后,其源数据默认存放在 /var/lib/mysql/ 目录下,一般情况下,该目录在根目录下,由于Linux系统默认  根目录所在挂载的磁盘容量有限,随着生产数据的不断产生,该目 ...

  5. 【MM系列】SAP MM-模块物料主数据简介

    公众号:SAP Technical 本文作者:matinal 原文出处:http://www.cnblogs.com/SAPmatinal/ 原文链接:[MM系列]SAP MM-模块物料主数据简介   ...

  6. C语言作业总结

    .## 一.我学到的内容 二.我的收获 作业 学到的知识点简介 C语言I博客作业01 学习了markdown语法. C语言I博客作业02 学习了<提问的智慧>. C语言I博客作业03 了解 ...

  7. ModelForm基本使用

    介绍 Django提供Form和ModelForm两种表单验证方式.相比较Form,ModelForm可以直接与与数据库表相关联,不需要像Form那样需要手动逐一字段添加表单验证的字段.且可以随意选择 ...

  8. [Git] 001 初识 Git 与 GitHub 之新建仓库

    在 GitHub 的 UI 界面使用 Git 新建一个仓库 1. 点击右上角的 +,选择 New repository 2. 网站会自动跳转至新页面,在下框中填入仓库名 仓库名也有讲究,挖个坑,日后填 ...

  9. pyhton常用快捷键

    常用快捷键 快捷键 功能 Ctrl + Q 快速查看文档 Ctrl + F1 显示错误描述或警告信息 Ctrl + / 行注释(可选中多行) Ctrl + Alt + L 代码格式化 Ctrl + A ...

  10. 微信JS-SDK选择图片遇到的坑

    微信JS-SDK选择图片遇到的坑 有个需求要在微信企业号里面做开发,有个功能是选择图片,使用input标签肯定是不管用了,Android手机上不能多选,所以使用了微信的JS-SDK提供的相关API,这 ...