博客
关于我
Ubuntu 20.04 Desktop 安装 配置 Git
阅读量:353 次
发布时间:2019-03-04

本文共 581 字,大约阅读时间需要 1 分钟。

 

由于Ubuntu库中包含git,本文以命令行安装 Git。

一  安装Git

sudo apt install git 

中途回复一下 Y ,等待下载完成即可。

 二  查看安装的版本

git --version

三  配置git

git config --global user.name "用户名"

git config --global user.email "邮箱地址"

查看配置信息:

git config --list

四  生成密钥 

在终端输入命令,生产密钥

ssh-keygen -C "邮箱地址" -t rsa

切换到密钥的保存目录下:

使用 vi 或者 gedit 打开 id_rsa.pub文件,将里面的内容复制出来。

五  GIt添加SSH密钥

登录你自己的git账户,找到设置

点击 New SSH key,添加密钥,名字自己取,然后将密钥粘贴即可,完成后会验证密码。

六 测试连接

ssh -T git@github.com

中途回复一下 yes

七  克隆仓库

在git仓库中找到自己要克隆的仓库

克隆仓库

git clone 仓库地址

执行命令等待下载完成即可。

可以看到 文件夹上面有个锁,代表当前用户没有权限对该目录操作。用文件所有者用户修改权限即可。

修改权限:

chmod 777 -R  文件名 

到此,git 的安装与配置及简单操作完成。

 

 

 

 

 

 

转载地址:http://ykme.baihongyu.com/

你可能感兴趣的文章
NMF(非负矩阵分解)
查看>>
nmon_x86_64_centos7工具如何使用
查看>>
NN&DL4.1 Deep L-layer neural network简介
查看>>
NN&DL4.3 Getting your matrix dimensions right
查看>>
NN&DL4.7 Parameters vs Hyperparameters
查看>>
NN&DL4.8 What does this have to do with the brain?
查看>>
nnU-Net 终极指南
查看>>
No 'Access-Control-Allow-Origin' header is present on the requested resource.
查看>>
No 'Access-Control-Allow-Origin' header is present on the requested resource.
查看>>
NO 157 去掉禅道访问地址中的zentao
查看>>
no available service ‘default‘ found, please make sure registry config corre seata
查看>>
No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?
查看>>
no connection could be made because the target machine actively refused it.问题解决
查看>>
No Datastore Session bound to thread, and configuration does not allow creation of non-transactional
查看>>
No fallbackFactory instance of type class com.ruoyi---SpringCloud Alibaba_若依微服务框架改造---工作笔记005
查看>>
No Feign Client for loadBalancing defined. Did you forget to include spring-cloud-starter-loadbalanc
查看>>
No mapping found for HTTP request with URI [/...] in DispatcherServlet with name ...的解决方法
查看>>
No mapping found for HTTP request with URI [/logout.do] in DispatcherServlet with name 'springmvc'
查看>>
No module named 'crispy_forms'等使用pycharm开发
查看>>
No module named cv2
查看>>