当前位置:   article > 正文

[笔记]github SSH 配置_ssh -t git@

ssh -t git@

github官方ssh配置教程
Git–SSH登录

git bash 密钥登录

检查现有密钥否

windows路径:C:\Users${用户名}.ssh
LInux路径:~/.ssh 或者 /home/${用户名}/.ssh
一般*.pub就是公钥了
没有.pub文件就是没有了

生成密钥

git自带ssh生成命令

ssh-keygen -t rsa -C xxx@xxx.com
  • 1

添加密钥

  1. 登录github
  2. setting
  3. SSH and GPG keys
  4. New SSH Key
  5. Key一栏里面填上*.pub的内容

在这里插入图片描述

测试密钥

ssh -T git@github.com
  • 1

这是我Centos系统成功是输出

ssh -T git@github.com
The authenticity of host 'github.com (20.205.243.166)' 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
Warning: Permanently added 'github.com,20.205.243.166' (RSA) to the list of known hosts.
Enter passphrase for key '/root/.ssh/id_rsa': 
Hi ShiverZm! You've successfully authenticated, but GitHub does not provide shell access.
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7

Windows反而没成功

$ ssh -T git@github.com
Warning: Permanently added the RSA host key for IP address '13.250.177.223' to the list of known hosts.
\302\226git@github.com: Permission denied (publickey).
  • 1
  • 2
  • 3

使用密钥登录

TortoriseGit 密钥登录

https://www.cnblogs.com/zy20160429/p/7493693.html

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

闽ICP备14008679号