github详细操作,github怎么使用教程

首页 > 经验 > 作者:YD1662022-11-04 09:31:33

github详细操作,github怎么使用教程(5)

公钥:

ssh key$ cd ~/.ssh , 查询是否存储公钥
ssh-keygen -t rsa -C "此处为你的邮箱"
$ ssh-keygen -t rsa -C "XXXXX.com"

创建公钥名称为user2items(可以不写)
Enter file in which to save the key (/c/Users/DELL/.ssh/id_rsa): user2items

发现有2个文件:user2items.pub 和 user2items

记事本打开user2items.pub, 复制内容到github :

点击头像进入Settings -> SSH and GPG keys -> New SSH key,将复制的信息粘贴到该处。

测试:

$ ssh -T git@github.com
Hi user2items! You've successfully authenticated, but GitHub does not provide shell access.

github详细操作,github怎么使用教程(6)

3.3 上传代码到远端仓储:

git init ##初始化
git add . ## 添加当前位置的全部文件, 注意 "."
git remote add origin xxx ## 添加远端仓储,origin 为远端在本地的服务主机名称,xxx 为远端url地址
git commit -m "注释语句" ## 提交到本地仓储
git push -u origin master ## 从本地上传github

github详细操作,github怎么使用教程(7)

github详细操作,github怎么使用教程(8)

上一页123下一页

栏目热文

文档排行

本站推荐

Copyright © 2018 - 2021 www.yd166.com., All Rights Reserved.