博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
git中fatal: Authentication failed的问题
阅读量:6993 次
发布时间:2019-06-27

本文共 1107 字,大约阅读时间需要 3 分钟。

git中fatal: Authentication failed的问题

  • 有两种办法,一种是删除重新认证,另一种是使用Ssh

    删除重新认证

有控制面板->用户账户->管理windows凭据->应用凭据

找到删除

使用ssh

如何创建公钥

  1. 首先启动一个Git Bash窗口(非Windows用户直接打开终端)
  2. 执行:
cd ~/.ssh

如果返回“… No such file or directory”,说明没有生成过SSH Key,直接进入第4步。否则进入第3步备份!

  1. 备份:
mkdir key_backup mv id_isa* key_backup
  1. 生成新的Key:(引号内的内容替换为你自己的邮箱)
ssh-keygen -t rsa -C "your_email@youremail.com"

输出显示:

>Generating public/private rsa key pair. Enter file in which to save the key (/Users/your_user_directory/.ssh/id_rsa):

直接回车,不要修改默认路劲。

>Enter passphrase (empty for no passphrase):
Enter same passphrase again:

设置一个密码短语,在每次远程操作之前会要求输入密码短语!闲麻烦可以直接回车,不设置。

  1. 成功:
Your identification has been saved in /Users/your_user_directory/.ssh/id_rsa. Your public key has been saved in /Users/your_user_directory/.ssh/id_rsa.pub. The key fingerprint is: ... ...
  1. 提交公钥:
  • 找到.ssh文件夹(一般在C盘user/用户名目录下),用文本编辑器打开“id_rsa.pub”文件,复制内容到剪贴板。
  • 打开 https://github.com/settings/ssh ,点击 Add SSH Key 按钮,粘贴进去保存即可。

    https://blog.csdn.net/qq_34665539/article/details/80408282

    https://gist.github.com/yisibl/8019693

转载于:https://www.cnblogs.com/ants_double/p/10767705.html

你可能感兴趣的文章
Spring配置文件详解
查看>>
Vue学习计划基础笔记(五) - 表单输入绑定、组件基础
查看>>
php验证字符串是否以逗号隔开包括中文字符串
查看>>
性能测试基础知识
查看>>
hdu 3466 Proud Merchants 01背包变形
查看>>
Codeforces 623D [Amazing概率题]
查看>>
React 点击删除列表中对应项(React 获取DOM中自定义属性)
查看>>
VIPM 发布功能总结
查看>>
sql server存儲過程語法
查看>>
msbuild ignore project dependencies问题
查看>>
Mysql InnoDB锁
查看>>
Google搜索技巧
查看>>
Android210 调试支持 wince6.0系统
查看>>
Android 开发佳站
查看>>
JSR310 时间类型的相互转换
查看>>
Support Vector Machine (2) : Sequential Minimal Optimization
查看>>
过滤器
查看>>
委托和回调函数例子
查看>>
XML与HTML 区别
查看>>
1312:【例3.4】昆虫繁殖(递推算法)
查看>>