我有一家(私人)公司账户,并启用了双重身份验证,所以我不得不合并一些帖子才能使其正常工作,如下所示。(记录下来可能对具有相同情况的人有用)
Initially it was the Fatal Error.
fatal: repository 'https:
...
remote: Repository not found.
fatal: repository 'https:
按照这里提供的方法安装了凭据管理器并更新了GIT:https://codeshare.co.uk/blog/how-to-solve-the-github-error-fatal-httprequestexception-encountered/
但是当我尝试使用克隆命令时,问题并没有解决,反而变成了下面这个:
$ git clone https://<username>:<password>@github.com/<ORG_NAME>/<PROJECT-NAME>.git
remote: Invalid username or password.
fatal: Authentication failed for 'https://
我的密码中有$符号,但GIT命令行/GIT Bash不喜欢它。我在返回的错误文本中没有看到$符号。
fatal: Authentication failed for 'https://<username>:<password-missing-$-symbol>@github.com/<ORG_NAME>/<PROJECT-NAME>.git'
我必须引用这个网站:https://git-scm.com/book/zh/v2/Git-Tools-Credential-Storage
请注意:如果您的帐户在Windows凭据管理器中存储了错误的密码,那么这也会加重问题。在进行下面的步骤之前,我删除了以这种方式存储的GitHub凭据。
$ git config --global credential.helper cache
$ git clone https://<username>:<password>@github.com/<ORG_NAME>/<PROJECT-NAME>.git
现在 Windows 凭据管理器弹出。我在文本框中输入了我的用户名和密码(这接受了我的带有 $ 符号的密码),并提示我输入2因素认证代码。我输入了 Google Authenticator 的认证代码,克隆进程成功启动。
git clone https://username:token@github.com/user/repo
。 - desert_ranger