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博客

目录
相关文章
|
3月前
|
网络安全 开发工具 git
解决fatal:remote error:You can’t push to git://github.com/username/*.g
通过上述诊断与修复步骤,绝大多数的推送错误都能得到有效解决,确保您的Git工作流顺畅无阻。
261 1
|
4月前
|
Java Linux 开发工具
IDEA中git提交前如何关闭code analysis以及开启格式化代码
【10月更文挑战第12天】本文介绍了在 IntelliJ IDEA 中关闭代码分析和开启代码格式化的步骤。关闭代码分析可通过取消默认启用检查或针对特定规则进行调整实现,同时可通过设置 VCS 静默模式在提交时跳过检查。开启代码格式化则需在 `Settings` 中配置 `Code Style` 规则,并通过创建 Git 钩子实现提交前自动格式化。
1180 3
|
5月前
|
Shell 网络安全 开发工具
fatal: unable to access 'https://github.com/wolfcw/libfaketime.git/': Encountered end of file
fatal: unable to access 'https://github.com/wolfcw/libfaketime.git/': Encountered end of file
|
6月前
|
存储 开发工具 数据安全/隐私保护
解决Gitee或者Github出现Access denied fatal: unable to access,The requested URL returned error: 403
解决Gitee或者Github出现Access denied fatal: unable to access,The requested URL returned error: 403
1125 0
|
8月前
|
开发工具 git
出现“error: failed to push some refs to ‘https://github.com/****.git‘”,如何解决问题
出现“error: failed to push some refs to ‘https://github.com/****.git‘”,如何解决问题
898 1
|
8月前
|
开发工具 git
MAC如何使用Git命令行上传本地项目及理解,failed to push some refs to ‘https://gitee.com/brother-barking/spxx.git
MAC如何使用Git命令行上传本地项目及理解,failed to push some refs to ‘https://gitee.com/brother-barking/spxx.git
|
9月前
|
网络安全 数据安全/隐私保护
解决git@github.com: Permission denied (publickey). fatal: Could not read from remote repository. Pleas
解决git@github.com: Permission denied (publickey). fatal: Could not read from remote repository. Pleas
1561 0
|
负载均衡 网络安全 持续交付
|
18天前
|
网络安全 开发工具 git
mac git clone命令提示git@gitee.com: Permission denied (publickey).问题修复
mac git clone命令拉取gitee上项目代码时提示密钥问题
|
3月前
|
开发工具 git
git 常用命令
这些只是 Git 命令的一部分,Git 还有许多其他命令和选项,可根据具体需求进行深入学习和使用。熟练掌握这些命令能够帮助你更高效地管理代码版本和协作开发。