首页 技术 正文
技术 2022年11月23日
0 收藏 872 点赞 2,667 浏览 826 个字

0.下载git

官网下载速度慢,下载不下来
阿里云下载地址:https://npm.taobao.org/mirrors/git-for-windows/


1.安装git

linux:
在命令行直接输入:git,查看结果,有没有安装。
如果没有安装,sudo apt install git


2.设置姓名和邮箱及命令行输出颜色`

git config –global user.name “Mike”
git config –global user.email “z_runwei@163.com”
git config –global color.ui auto


3.创建 SSH Key

ssh-keygen -t rsa -C “your_email@example.com”
* 显示:
Generating public/private rsa key pair.
Enter file in which to save the key
(/Users/your_user_directory/.ssh/id_rsa): 按回车键
Enter passphrase (empty for no passphrase): 输入密码3307086;一般不输入密码,直接回车
Enter same passphrase again: 再次输入密码


4.在github网站上注册账号并登陆


5.在GitHub中添加公开密钥,今后就可以用私有密钥进行认证了。


6.测试:

用手中的私人密钥与GitHub进行认证和通信
ssh -T git@github.com


7.在github建立仓库


8.在命令行clone仓库

git clone git@github.com:zrunwei/HelloWorld.git(ssh传输协议)
git clone https://github.com/zrunwei/HelloWorld [myHelloWorld](http传输协议)

git clone 后面的内容到github上复制
想克隆到哪里就在哪个文件夹里右击,点击Git Bash Here,再执行以上命令

上一篇: git基础介绍
相关推荐
python开发_常用的python模块及安装方法
adodb:我们领导推荐的数据库连接组件bsddb3:BerkeleyDB的连接组件Cheetah-1.0:我比较喜欢这个版本的cheeta…
日期:2022-11-24 点赞:878 阅读:9,075
Educational Codeforces Round 11 C. Hard Process 二分
C. Hard Process题目连接:http://www.codeforces.com/contest/660/problem/CDes…
日期:2022-11-24 点赞:807 阅读:5,551
下载Ubuntn 17.04 内核源代码
zengkefu@server1:/usr/src$ uname -aLinux server1 4.10.0-19-generic #21…
日期:2022-11-24 点赞:569 阅读:6,399
可用Active Desktop Calendar V7.86 注册码序列号
可用Active Desktop Calendar V7.86 注册码序列号Name: www.greendown.cn Code: &nb…
日期:2022-11-24 点赞:733 阅读:6,176
Android调用系统相机、自定义相机、处理大图片
Android调用系统相机和自定义相机实例本博文主要是介绍了android上使用相机进行拍照并显示的两种方式,并且由于涉及到要把拍到的照片显…
日期:2022-11-24 点赞:512 阅读:7,811
Struts的使用
一、Struts2的获取  Struts的官方网站为:http://struts.apache.org/  下载完Struts2的jar包,…
日期:2022-11-24 点赞:671 阅读:4,893