一、Git使用笔记-Git初始化过程

环境准备

1、到官网下载Git客户端。官网地址:https://git-scm.com。在官网找到对应的系统下载对应的版本,在本地安装即可。

配置用户信息

用户信息需要与在Github或者Coding.NET以及其他Git服务器上的用户名和邮箱相同。

执行如下命令:

git config --global user.name "username"

git config --global user.email "[email protected]"

配置公钥信息

Git服务器都需要公钥认证,例如Coding.net需要填写你的公钥,如下图:

一、Git使用笔记-Git初始化过程_第1张图片
Coding.net填写公钥

在本地生成公钥过程如下:

cd ~/.ssh

ssh-keygen -t rsa -C "[email protected]"

cat ~/.ssh/id_rsa.pub

最后将id_rsa.pub中的内容复制填写到页面中即可。

到此,初始化过程结束。



更多技术分享,欢迎访问个人站点:技术驿站

你可能感兴趣的:(一、Git使用笔记-Git初始化过程)