[七月挑选]树莓派Raspberrypi上配置Git
title: 树莓派Raspberrypi上配置Git
树莓派Raspberrypi上配置Git。
开始
首先你得有一树莓派!!!
过程
查看自己树莓派的版本
pi@raspberrypi:~ $ uname -a
运行效果:
Linux raspberrypi 4.9.59-v7+ #1047 SMP Sun Oct 29 12:19:23 GMT 2017 armv7l GNU/Linux
查看自己树莓派是否有安装Git
pi@raspberrypi:~ $ git --version
运行结果:
git version 2.11.0
设置自己的用户名称及电子邮箱
pi@raspberrypi:~ $ git config --global user.name "proschan"
pi@raspberrypi:~ $ git config --global user.email "710437653@qq.com"
运行效果:无,生成.gitconfig文件
查看.gitconfig文件
pi@raspberrypi:~ $ ls -al
运行效果:
total 104
drwxr-xr-x 18 pi pi 4096 Feb 1 12:56 .
drwxr-xr-x 3 root root 4096 Nov 29 01:22 ..
-rw------- 1 pi pi 802 Jan 25 16:08 .bash_history
-rw-r--r-- 1 pi pi 220 Nov 29 01:22 .bash_logout
-rw-r--r-- 1 pi pi 3523 Nov 29 01:22 .bashrc
drwxr-xr-x 6 pi pi 4096 Jan 20 09:03 .cache
drwx------ 11 pi pi 4096 Jan 20 15:12 .config
drwxr-xr-x 2 pi pi 4096 Nov 29 02:56 Desktop
drwxr-xr-x 5 pi pi 4096 Nov 29 02:22 Documents
drwxr-xr-x 2 pi pi 4096 Nov 29 02:56 Downloads
-rw-r--r-- 1 pi pi 50 Feb 1 12:56 .gitconfig
drwx------ 3 pi pi 4096 Nov 29 02:56 .gnupg
drwxr-xr-x 2 pi pi 4096 Jan 20 15:23 .idlerc
drwxr-xr-x 3 pi pi 4096 Nov 29 02:22 .local
drwxr-xr-x 2 pi pi 4096 Nov 29 02:56 Music
drwxr-xr-x 2 pi pi 4096 Nov 29 02:56 Pictures
drwx------ 3 pi pi 4096 Jan 20 09:03 .pki
-rw-r--r-- 1 pi pi 675 Nov 29 01:22 .profile
drwxr-xr-x 2 pi pi 4096 Nov 29 02:56 Public
drwxr-xr-x 2 pi pi 4096 Nov 29 02:22 python_games
drwxr-xr-x 2 pi pi 4096 Nov 29 02:56 Templates
drwxr-xr-x 3 pi pi 4096 Nov 29 02:56 .themes
drwxr-xr-x 2 pi pi 4096 Nov 29 02:56 Videos
-rw------- 1 pi pi 56 Jan 25 16:09 .Xauthority
-rw------- 1 pi pi 3954 Jan 25 16:09 .xsession-errors
-rw------- 1 pi pi 3954 Jan 25 14:58 .xsession-errors.old
创建SSH钥匙
pi@raspberrypi:~ $ ssh-keygen -t rsa -C "710437653@qq.com"
运行效果:
Generating public/private rsa key pair.
Enter file in which to save the key (/home/pi/.ssh/id_rsa):
Created directory '/home/pi/.ssh'.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/pi/.ssh/id_rsa.
Your public key has been saved in /home/pi/.ssh/id_rsa.pub.
The key fingerprint is:
SHA256:5s/lSMpU7gFcGYEEqOemcpctzr2h1oROisbEFot/r38 710437653@qq.com
The key's randomart image is:
+---[RSA 2048]----+
| ..o..o. |
| . . o |
| . o |
| .. . . . |
|o oo . S . |
|.= = .o + |
|+o * =. o + . |
|oo=.Boo+E* = |
|.o ====oo = . |
+----[SHA256]-----+
查看自己的公钥
pi@raspberrypi:~ $ cat /home/pi/.ssh/id_rsa.pub
运行效果:
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCodo81VEoEeLcX15cjYtaFBpU7jxqII9niGyccEWuVf5jjLyCMqT/WD4ru1yXmxA5XPgCSpriflf3zqkqzybRiFERQP0G4OHZBoHCWsamNEv1Ohs1mHTzQ0t8Ko2DCTps1EEo2vtMHMNpCqBXo05/LjEF/jzA9k0GYMI73XjeI/bI/mZFi+wJpF8flyf7mbK别看我的看你自己的44kHUxWKI1a9EL/vqMz+4YTsWvOKtURuRVRE/v0XRPufwKKtHcOV35EWQrxamvqhXcJmv5RBFWvRUpLvkx2wUXyplSpARBFpdEbuSf1JDH77VClr00396czTTszQW6o8zQX3VnGdXHw1TrA/kv/ 710437653@qq.com
在github官网配置SSH and GPG keys
找到Personal settings -> SSH and GPG keys -> New SSH key
Title : 填写自己易于理解的标题
key : 填写上面公钥内容
点击 Add SSH Key
校验树莓派的认证是否成功
pi@raspberrypi:~ $ ssh -T git@github.com
运行效果:
The authenticity of host 'github.com (192.30.255.112)' 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,192.30.255.112' (RSA) to the list of known hosts.
Hi proschan! You've successfully authenticated, but GitHub does not provide shell access.
打完收枪!
结束
多半查找度娘上具体linux的配置,如果纰漏请联系我(710437653@qq.com),感谢谢谢Thank you~!
本博客来自https://chanchifeng.com/2018/06/12/raspberrypi-git/
[七月挑选]树莓派Raspberrypi上配置Git的更多相关文章
- 在香蕉派的树莓派系统上配置 Syncthing 自启动
在香蕉派的树莓派系统上配置 Syncthing 自启动 —— 魏刘宏 2020 年 1 月 19 日 首先做个名词解释,” 香蕉派” 是国内一款山寨树莓派的硬件产品,” 树莓派系统” 指的是”rasp ...
- windows上配置git
windows上配置git1.下载mysisigit进入http://msysgit.github.io/,下载,安装,下一步下一步即可. 2.下载tortoisegit进入http://downlo ...
- 本地Linux服务器上配置Git
当我们需要拉取远程服务器代码到本地服务器时,我们首先要确定已经配置了正确的Git账号,可以从~/.gitconfig文件(为隐藏文件,需要使用ls -a查看),以及~/.ssh下的id_rsa.pub ...
- coding上创建项目、创建代码仓库、将IDEA中的代码提交到coding上的代码仓库、Git的下载、IDEA上配置git
文章目录 一.Git的安装以及子啊IDEA上配置Git(下载好的可以跳过) 二.怎样让IDEA和Git建立关系 三.在coding上创建项目 四.在coding上创建代码仓库 五.Git工作理论 六. ...
- 图解如何在Linux上配置git自动登录验证
记录一下配置git操作远程仓库时的自动验证,效果如下图: 本文介绍的是Linux下的配置.Windows上默认已经启用凭证存储和自动验证(依靠wincred实现,以后会使用GCM-Core). 准备工 ...
- 【玩转Ubuntu】04. Ubuntu上配置git环境
1. 使用PPA安装Git PPA,表示 Personal Package Archives,也就是个人软件包集. 有很多软件因为种种原因,不能进入官方的 Ubuntu 软件仓库. 为了方便 Ubun ...
- Idea项目上传git(与git结合使用)
Prerequisite(前提): 1.拥有github账号 2.本地电脑安装git 3.拥有一个guthub的新仓库 一.本地git与github安全连接(若已经将本地git与github建立连接, ...
- phpstorm配置git并解决Terminal 中文乱码(Unicode 编码)的方法
前言:在使用PHPstorm的时候,需要用到terminal,主要还是用这个操作git,但是在使用这个的时候会发现,代码里所有中文都是乱码状态,不利于使用,下面就来看看怎么解决这个问题 一.先在php ...
- 在Ubuntu 18.04上安装Git
步骤1.首先,通过运行以下命令确保您的系统和apt包列表完全更新: apt-get update -yapt-get upgrade -y 第2步.在Ubuntu 18.04上安装Git. 现在让我们 ...
随机推荐
- ModelSerializer 使用知识点_serializer.save(project=obj) #外键一定要作为实例传入save函数,否则无法新增成功
1.有两个模型如下 A.project class Project(models.Model): """ 项目表 """ id = mode ...
- wordcloud:让你的词语像云朵一样美
介绍 对文本中出现频率较高的关键词给予视觉化的显示 使用 python import jieba import codecs import wordcloud file = r"C:\U ...
- sqli-lab(8)
布尔型单引号GET盲注 发现加个单引号跟没加显示不一样,加了单引号连you are in都不显示了,没有报错,所以只能用盲注判断了 0X01爱之先了解 盲注需要掌握一些MySQL的相关函数:lengt ...
- css中如何使用border属性与display属性
border属性介绍 border属性设置元素边框. 边框3个要素如:粗细.线型.颜色. 边框线型属性值说明表如: 属性指 描述 none 定义无边框. hidden 与 "none&quo ...
- 《Effective Java》读书笔记 - 8.通用编程
Chapter 8 General Programming Item 45: Minimize the scope of local variables local variables应该在他们要被用 ...
- leetcode-mid-sorting and searching-34 Search for a Range
mycode 63.98% class Solution(object): def searchRange(self, nums, target): """ :typ ...
- Flask基础总结
Flask 基础总结 .Flask优点: 拥有强大的第三方组件小而精非常全面,不足就是更新太快 .Flask中的三剑客: HTTPRespone redierct render_template .F ...
- WPF WebBrowser 加载 html ,出现安全警告, 运行 脚本和 activeX 控件,
对于你的问题,只需要在你的HTML首行添加如下代码即可隐藏安全提示条: <!-- saved from url=(0014)about:internet --> 还有一个可选方案是使用Wi ...
- ES6 class 语法糖不能直接定义原型上的属性
今天注意到两个东西: 1.为了模拟面向对象,JavaScript的class语法糖屏蔽了原型的概念 class A{ a = 1 // 注意!!这里定义的不是在prototype上的属性,而是给实 ...
- pyinstaller-python->exe
pip install pyinstaller. pyinstaller -F /home/base64_decode.py https://www.imooc.com/article/26772 h ...