git与pycharm的连接设定

git官网下载地址:https://git-scm.com/downloads自己进去找对应的版本

git中用户名及邮箱的设定

git config --global user.name "用户名"
git config --global user.name "用户邮箱"
cd ~/.ssh`                   # 进入到~./ssh中   如果显示No such file or directory  则进行下一步   否则直接跳过下一步
mkdie ~/.ssh
cd ~/.ssh

生成RSA摘要 在git 与 GitHub 之间建立链接

$ ssh-keygen -t rsa -C "用户邮箱"                 ----这个是命令
Generating public/private rsa key pair.
Enter file in which to save the key (/c/Users/axing/.ssh/id_rsa):                    # 回车即可
Enter passphrase (empty for no passphrase):					     					 # 回车即可
Enter same passphrase again:	           					    					 # 回车即可
Your identification has been saved in /c/Users/axing/.ssh/id_rsa
Your public key has been saved in /c/Users/axing/.ssh/id_rsa.pub
The key fingerprint is:
SHA256:OU9e2+vM546g/HZ1w6t3i5yh+PtRkZhrHtxzoY+e5q8 用户邮箱
The key's randomart image is:
+---[RSA 3072]----+
|                 |
|              o .|
|             o + |
|         .  . + o|
|        S . .*.+.|
|         = .oo=o=|
|          o o=.o+|
|         ...==B=o|
|         .+**E@*=|
+----[SHA256]-----+

去GitHub中-------以下看图
在这里插入图片描述
上面的操作完成后,再回到Git Bash 命令框

$ ssh git@github.com        # 与github.com 建立来连接
The authenticity of host 'github.com (20.205.243.166)' can't be established.
ED25519 key fingerprint is SHA256:+DiY3wvvV6TuJJhbpZisF/zLDA0zPMSvHdkr4UvCOqU.
This key is not known by any other names
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added 'github.com' (ED25519) to the list of known hosts.
PTY allocation request failed on channel 0
Hi 用户! You've successfully authenticated, but GitHub does not provide shell access.
Connection to github.com closed.

注意上面的命令是在 ~/.ssh 中敲的,还有用户名 用户邮箱没有必要较真 瞎写点就好如果非要认真也没错。

接下来到pycharm中进行设定—见下图
在这里插入图片描述
打完 收工

以上仅仅为自己的实践记录,对内部理解不是很到位,欢迎交流、指正!

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值