配置git和github

1.Setting up Git(配置git)

#1.Download and install the latest version of Git.
#下载并安装最新的git
#2.On your computer, open the Terminal application.
#在你的电脑上,打开命令窗口
#3.Tell Git your name so your commits will be properly labeled. Type everything after the $ here:
#设置用户名
$git config --global user.name "YOUR NAME"

#Tell Git the email address that will be associated with your Git commits. 
#The email you specify should be the same one found in your email settings.
#设置邮箱

$git config --global user.email "EMAIL ADDRESS"
#Your email address will be visible on commits to GitHub. 
#If you'd like to keep your email address private, set your Git config email to username@users.
#noreply.github.com instead, replacing username with your GitHub username. For more information, see "Keeping your email address private."

2.Authenticating with GitHub from Git(认证git到github)

.Connecting over SSH(通过ssh链接)

Generating a new SSH key(创建新的ssh秘钥)
1.Open Terminal.(打开命令端)
2.Paste the text below, substituting in your GitHub email address.生成秘钥
$ssh-keygen -t rsa -b 4096 -C "your_email@example.com"

This creates a new ssh key, using the provided email as a label.

Generating public/private rsa key pair.
3.When you’re prompted to “Enter a file in which to save the key,” press Enter. This accepts the default file location.秘钥保存的位置
 Enter a file in which to save the key (/home/you/.ssh/id_rsa): [Press enter]
 ```
##### 4.At the prompt, type a secure passphrase. For more information, see "Working with SSH key passphrases".设置秘钥密码

Enter passphrase (empty for no passphrase): [Type a passphrase]
Enter same passphrase again: [Type passphrase again]
“`

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值