【问题标题】:facing error everytime in uploading a file in github每次在github中上传文件时都会遇到错误
【发布时间】:2022-01-26 04:19:53
【问题描述】:

我尝试安装 4.5 .net 框架,访问令牌,用户名密码访问他们要求的所有内容。但没有成功。这是我昨天面临的所有问题。我使用的是 Windows 7 Ultimate Service Pack 1。

这样的git错误

Home_System@Home_System-PC MINGW64 ~/Desktop/myproj (master)
$ git commit -m "first commit"
[master (root-commit) ef8fd3c] first commit
 2 files changed, 2 insertions(+)
 create mode 100644 hello.py
 create mode 100644 my.py

Home_System@Home_System-PC MINGW64 ~/Desktop/myproj (master)
$ git status
On branch master
nothing to commit, working tree clean

Home_System@Home_System-PC MINGW64 ~/Desktop/myproj (master)
$ git remote add origin https://github.com/arshad007hossain/myproj.git

Home_System@Home_System-PC MINGW64 ~/Desktop/myproj (master)
$ git pull origin master
fatal: couldn't find remote ref master

Home_System@Home_System-PC MINGW64 ~/Desktop/myproj (master)
$ git pull origin master
fatal: couldn't find remote ref master

Home_System@Home_System-PC MINGW64 ~/Desktop/myproj (master)
$ git push --force origin master
fatal: An error occurred while sending the request.
fatal: The request was aborted: Could not create SSL/TLS secure channel.
Logon failed, use ctrl+c to cancel basic credential prompt.
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/arshad007hossain/myproj.git/'

【问题讨论】:

  • 这几乎肯定与您使用的是没有更新或安全支持的过时操作系统有关。至少“无法创建 SSL/TLS 安全通道”部分。
  • 我必须使用更高版本的操作系统吗

标签: git github ssl windows-7


【解决方案1】:

在您的情况下,发送到 GitHub 的凭据包含不是个人访问令牌或 OAuth 令牌的东西。您的凭证管理器可能是使用 .NET 的 Git Credential Manager Core,这无济于事。由于您使用的操作系统 (Windows 7) 没有安全更新或其他修复程序,因此这可能无法帮助 GCM Core 正常工作。

Windows 7 不一定正确支持 TLS 1.2,因此,当 GCM Core 无法正常工作时。 TLS 1.2 被认为是当今互联网上 TLS 的最低安全版本,包括 GitHub 在内的大多数网站都不支持更少的版本。

通常还负责确保您运行的系统接收定期安全更新,因为它可以防止您的计算机受到损害并被用来对其他系统发起攻击。即使您不关心数据的安全性和完整性,其他人也会欣赏您的系统不是 DDoS 网络中的机器人。

如果你真的需要同时推送,你可以尝试切换到wincred凭证助手,它可能没有这个问题,然后使用以下命令删除所有现有的凭证:

$ git config --unset-all credential.helper
$ git config --global credential.helper wincred
$ echo url=https://github.com | git credential reject

完成此操作后,当您推送时,系统会提示您输入用户名和密码。出现提示时输入您的用户名,当提示输入密码时,转到GitHub's Personal Access Token page,生成具有repogist 范围的令牌,然后将该令牌粘贴到而不是密码。这应该能让事情暂时发挥作用。

【讨论】:

    猜你喜欢
    • 2019-05-12
    • 2015-05-21
    • 1970-01-01
    • 2011-04-24
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多