当前位置:   article > 正文

git与pycharm的连接设定_pycharm 配置git ssh

pycharm 配置git ssh

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

git中用户名及邮箱的设定

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

生成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]-----+
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21

去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.
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9

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

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

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

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/煮酒与君饮/article/detail/738564
推荐阅读
相关标签
  

闽ICP备14008679号