栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 系统运维 > 运维 > Linux

Ubuntu使用git clone登录外网下载资源

Linux 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

Ubuntu使用git clone登录外网下载资源

一、背景

1、使用 git clone 下载资源报错误: Failed to connect to android.googlesource.com port 443: Connection timed out

二、Ubuntu安装配置

1、安装git,ssh

sudo apt-get install git

sudo apt-get install ssh

2、注册github账号,已有跳过,

github官网:https://github.com

如果网络限制登录不了可以在网上下载翻墙软件,也可以@作者

3、配置用户信息

Ubuntu终端输入下面三条命令:

git config --global user.name "Your Name"
git config --global user.email "Your_email@example.com"

git init

4、创建密钥文件,email@example.com是GitHub账号邮箱

ssh-keygen -t rsa -C "email@example.com"

创建的密钥文件如下所示,其中id_rsa为私钥,id_rsa.pub为公钥

5、将公钥添加到GitHub账号

5.1 输入下面命令将公钥复制到粘贴板,如果没有xclip,安装xclip:sudo apt-get install xclip

xclip -sel clip < ~/.ssh/id_rsa.pub

5.2、登录GitHub账号,点击setting->SSH and GPG keys->New SSH key

GitHub官网:https://github.com

 6、ssh测试,出现一下打印则为配置成功

ssh -T git@github.com

 正式下载资源,如果输入下面命令无法下载资源,可能要翻墙才能下载。需要下载翻墙软件。

git clone https://android.googlesource.com/platform/external/avb/

 完 !

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/835687.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号