当前位置:首页 > 操作系统 > Linux

linux系统通过ssh拉取gitee项目

1.创建一个文件夹

linux系统通过ssh拉取gitee项目 - 文章图片

 

 空文件

linux系统通过ssh拉取gitee项目 - 文章图片

 

 2.git init

linux系统通过ssh拉取gitee项目 - 文章图片

 

 3.尝试git remote  add origin +ssh地址

linux系统通过ssh拉取gitee项目 - 文章图片

 提示没有权限

4.尝试git clone +ssh地址

linux系统通过ssh拉取gitee项目 - 文章图片

 

 提示没有权限

5.需要设置公钥

没设置之前

linux系统通过ssh拉取gitee项目 - 文章图片

 

 开始设置

linux系统通过ssh拉取gitee项目 - 文章图片

 

 中间连点三次空格

linux系统通过ssh拉取gitee项目 - 文章图片

 

 多出两个文件id_rsa  id_rsa.pub

id_rsa是私钥,id_rsa.pub是公钥

6.配置绑定密钥

私钥不要动,打开公钥

linux系统通过ssh拉取gitee项目 - 文章图片

公钥内容:

linux系统通过ssh拉取gitee项目 - 文章图片

 

 复制全部

 不要动里面内容退出

linux系统通过ssh拉取gitee项目 - 文章图片

 

 打开gitee项目管理

linux系统通过ssh拉取gitee项目 - 文章图片

 

 linux系统通过ssh拉取gitee项目 - 文章图片

 

 点开项目公钥管理

linux系统通过ssh拉取gitee项目 - 文章图片

 

 linux系统通过ssh拉取gitee项目 - 文章图片

 

 把刚才复制的公钥粘贴进去,起个名字保存。

linux系统通过ssh拉取gitee项目 - 文章图片

 

 添加成功

7.拉取项目

 


【说明】本文章由站长整理发布,文章内容不代表本站观点,如文中有侵权行为,请与本站客服联系(QQ:254677821)!

相关教程推荐

其他课程推荐