[Linux][Ubuntu安装配置Git]
Posted zy691357966
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了[Linux][Ubuntu安装配置Git]相关的知识,希望对你有一定的参考价值。
[Linux][Ubuntu安装配置Git]
标签(空格分隔): 未分类
hua wei ruan tiao yao yong
下载Git
apt-get install git
root
因为是刚在虚拟机装的linux ,没root权限,以及密码,所以还要
sudo passwd root //设置密码后
su root //进入root权限
发现速度太慢了。。dssddsd
换阿里云源
cp /etc/apt/sources.list /etc/apt/sources.list.bak
sources.list:
deb http://mirrors.aliyun.com/ubuntu/ xenial main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse
##测试版源
deb http://mirrors.aliyun.com/ubuntu/ xenial-proposed main restricted universe multiverse
# 源码
deb-src http://mirrors.aliyun.com/ubuntu/ xenial main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse
##测试版源
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-proposed main restricted universe multiverse
# Canonical 合作伙伴和附加
deb http://archive.canonical.com/ubuntu/ xenial partner
deb http://extras.ubuntu.com/ubuntu/ xenial main
sudo apt-get update 更新源
sudo apt-get upgrade 更新软件
111
配置用户信息:
git config --global user.name "username01"
git config --global user.email "abc123@huawei.com"
ssh key
生成SSH密钥:
ssh-keygen -t rsa -C "abc123@huawei.com"
gedit ~/.ssh/id_rsa.pub
clone
git clone git@codehub.devcloud.huaweicloud.com:17061f9356b54485848e1c6380bacef7/sdk-gcc.git
以上是关于[Linux][Ubuntu安装配置Git]的主要内容,如果未能解决你的问题,请参考以下文章
Linux(Ubuntu)使用日记------git安装使用
在Linux Ubuntu中使用Git连接到Github(附代码和截图)
在Linux Ubuntu中使用Git连接到Github(附代码和截图)