记录在使用git相关的一些问题及其解决
关于无法push代码到github仓库
最近在使用git push代码到github时,出现以下问题:
git.exe push --progress "https://github.com/username/repo_name.git" master
fatal: 发送请求时出错。
fatal: 请求被中止: 未能创建 SSL/TLS 安全通道。
fatal: 发送请求时出错。
fatal: 请求被中止: 未能创建 SSL/TLS 安全通道。
remote: Support for password authentication was removed on August 13, 2021. Please use a personal access token instead.
remote: Please see https://github.blog/2020-12-15-token-authentication-requirements-for-git-operations/ for more information.
fatal: Authentication failed for 'https://github.com/username/repo_name.git/'
这是因为从2021年8月开始,github已经不支持用密码连接了,需要使用token令牌。在github->setting->Developer settings->Personal access tokens中生成个人的token,然后此时的链接应为:
https://你的令牌@github.com/<USERNAME>/<REPO>.git
然后再push代码时,就成功了。
参考:【突发】解决remote: Support for password authentication was removed on August 13, 2021. Please use a perso
版权声明:本文为yideqianfenzhiyi原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。