git sync fatal: Authentication failed for https://github.com/ did not exit cleanly (exit code 128)

简介: git sync fatal: Authentication failed for https://github.com/ did not exit cleanly (exit code 128)

具体错误

D:\github\openjdk8-x86-amd64-arm64-aarch64>git push origin master
info: please complete authentication in your browser...
fatal: An error occurred while sending the request.
fatal: The request was aborted: Could not create SSL/TLS secure channel.
Username for 'https://github.com': quantum6
Password for 'https://quantum6@github.com':
remote: Support for password authentication was removed on August 13, 2021. Plea
se use a personal access token instead.
remote: Please see https://github.blog/2020-12-15-token-authentication-requireme
nts-for-git-operations/ for more information.
fatal: Authentication failed for 'https://github.com/quantum6/openjdk8-x86-amd64
-arm64-aarch64/'

原因是不支持密码方式了,改用令牌token


产生KEY

打开git-bash输入命令:


ssh-keygen -t rsa -b 4096
cat ~/.ssh/id_rsa.pub
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDE3Xu+zoNiZFmASBRDK+vKSTYkuqFPH8VisOfS/VH0jEdPoIXK9wAmVQwjy1EYtzInCUFbVBpdKM5GshPQrKhkLTA9oAbnANfLVtTx1iA10q4G5KyfB9RLgp8fG5nJDrZEvNLFwp+9MCwyU55jcgdbcOQyJQXA3GWGKE4c+WNViAUmrPpeYGvVmz5WLh8lCpZFpPjlPZpvjSTJfw== quantum6@WIN7
GITHUB新建SSHKEY
Sign in to GitHub · GitHub


SSH Keys


把cat内容复制到网页。


收到的邮件

The following SSH key was added to your account:
quantum6
SHA256:wfqWASnmKIG1jDntX9bxB2xTJKOwWp4Z8BbuONCGpbk
If you believe this key was added in error, you can remove the key and disable
access at the following location:
https://github.com/settings/keys

新建令牌。直接打开

https://github.com/settings/tokens/new

修改Expiration为No expiration(或者其他),所有的都选上(以后搞清楚了再定制新的)。点击Generate token。复制token令牌,类似:


ghp_EGL3ejUIdtAUwMs1fe6mIeefc2Amn3f9SvB


修改配置,更新代码

全网首发:github已经设置了令牌token,为什么还要验证用户密码_柳鲲鹏-CSDN博客

目录
相关文章
|
4月前
|
网络协议 Linux 网络安全
weavescope curl -L git.io/scope -o /usr/local/xx failed to connect to 2001: Network is unreachable
weavescope curl -L git.io/scope -o /usr/local/xx failed to connect to 2001: Network is unreachable
|
1月前
|
开发工具 git
Git -- 代码上传错误 error: failed to push some refs to ‘git@gitee.com:JMFive/uni-shop2.git‘
Git -- 代码上传错误 error: failed to push some refs to ‘git@gitee.com:JMFive/uni-shop2.git‘
|
2月前
|
网络安全 开发工具 git
git修改提交路径以及强制提交——异常:error: remote origin already exists.与异常:error: failed to push some refs to的解决
git修改提交路径以及强制提交——异常:error: remote origin already exists.与异常:error: failed to push some refs to的解决
20 0
|
3月前
|
Go 开发工具 git
【git】解决:Failed to connect to 127.0.0.1 port 7890: Connection refused
【git】解决:Failed to connect to 127.0.0.1 port 7890: Connection refused
492 0
|
2月前
|
Linux 开发工具 git
【开发专题_03】unable to access ‘https://github.com/deviantony/docker-elk.git/‘: Failed connect to github
【开发专题_03】unable to access ‘https://github.com/deviantony/docker-elk.git/‘: Failed connect to github
|
4月前
|
Windows
Windows【工具 01】视频下载工具BBDown.exe详细使用说明(https://github.com/nilaoda/BBDown)mp4格式无法识别问题处理(最新版本1.6.1网盘分享)
Windows【工具 01】视频下载工具BBDown.exe详细使用说明(https://github.com/nilaoda/BBDown)mp4格式无法识别问题处理(最新版本1.6.1网盘分享)
220 0
|
4月前
|
开发工具 git
[Git Error] failed to push some refs to “××××.git”
[Git Error] failed to push some refs to “××××.git”
48 0
|
14天前
|
缓存 数据可视化 网络安全
Git命令大全
Git命令大全
46 1
|
18天前
|
开发工具 git
Git教程:深入了解删除分支的命令
【4月更文挑战第3天】
37 0
Git教程:深入了解删除分支的命令
|
1月前
|
存储 Shell Linux
【Shell 命令集合 文件管理】Linux git命令使用教程
【Shell 命令集合 文件管理】Linux git命令使用教程
34 0