通过GitHub登录:

之后会跳转到改网址,登录账号:?
如果没有安装Git可以打开该链接下载安装,点击下载Git
?安装好后配置Git:

?点PyCharm菜单栏VCS--在GitHub上共享即可。
我在共享时一直报错许可不对,报错如下:

这个主要是因为服务端和客户端之间的SSH Key不匹配导致的,添加SSH Key方法如下:
终端里输入以下命令
ssh-keygen -t rsa -C ***@163.com # 写自己的邮箱
?回车执行上面命令后会提示如下:
Enter file in which to save the key (/Users/qianshaoqing/.ssh/id_rsa): # 提示将key保存在该路径下,点回车即可
Enter passphrase (empty for no passphrase): # 输入一个密码
Enter same passphrase again: # 确认密码
Your identification has been saved in /Users/qianshaoqing/.ssh/id_rsa.
Your public key has been saved in /Users/qianshaoqing/.ssh/id_rsa.pub. # Key保存路径
The key fingerprint is:
SHA256:1************** ***.com
The key's randomart image is:
+---[RSA 3072]----+
| o=+=ooo+O*==. |
| o .=.o1o=*+.o |
| . .+a.= o.+ |
| =E+ . + |
| o q . + . |
| . . . . |
| . . |
| . |
| |
+----[SHA256]-----+
打开访达,shift+command+G将上面保存Key的路径粘贴进去,打开id_rsa.pub文件

登录GitHub,添加SSH Key,如下:

将之前复制的Key粘贴进去即可?
?
点击“在GitHub上共享项目”时会提示输入id_rsa密码,该密码为上面命令行提示输入的密码。
|