IDEA中GITHUB配置

首先下载GIT GITHUB

打开GIT BASH


输入

git config --global user.name "YOUR NAME"
git config --global user.email "YOUR EMAIL ADDRESS"

先查看有没有本地的ssh

ls -al ~/.ssh
如果有  rm*

 继续:

ssh-keygen -t rsa -b 4096 -C "your_email@example.com"
Enter file in which to save the key (/Users/you/.ssh/id_rsa): [Press enter]
路径设置为默认就可以


Enter passphrase (empty for no passphrase): [Type a passphrase]
Enter same passphrase again: [Type passphrase again]
输入密码,可以为空


Your identification has been saved in /Users/you/.ssh/id_rsa.
Your public key has been saved in /Users/you/.ssh/id_rsa.pub.
The key fingerprint is:
01:0f:f4:3b:ca:85:d6:17:a1:7d:f0:68:9d:f0:a2:db your_email@example.com


之后到c盘用户目录下找.ssh 打开 rsa.pub文件 复制 


到浏览器中打开github

点击头像 settings

找到ssh key 添加 

将内容复制进去


最后测试一下:


ssh -T git@github.com
# Attempts to ssh to GitHub

The authenticity of host 'github.com (207.97.227.239)' can't be established.
RSA key fingerprint is 16:27:ac:a5:76:28:2d:36:63:1b:56:4d:eb:df:a6:48.
Are you sure you want to continue connecting (yes/no)?
输入yes


出现:

Hi username! You've successfully authenticated, but GitHub does not
provide shell access.

就代表成功了


后面就在idea中 点击vcs -import into version control- share project on GITHUB 就可以了

你可能感兴趣的:(IDEA中GITHUB配置)