无法从github克隆或提取 [英] Can't clone or pull from github

查看:225
本文介绍了无法从github克隆或提取的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试克隆私人仓库时,在询问用户名和密码后出现以下错误:

When I try to clone a private repo I get the following error, after being asked for username and password:

fatal: Authentication failed

我尝试重新安装最新的git并重新启动Windows 10.

I've tried reinstalling the latest git and rebooting windows 10.

我在github网站设置中尝试的另一件事是删除/删除个人访问令牌的授权(使用我尝试连接的有问题的计算机的名称).在我还收到无法获取本地发行者证书"之类的错误之前

Another thing I've tried from github website settings was removing/deleting the authorization for Personal access token (with the name of the problematic machine I'm trying to connect to). Before I was also getting an error like "unable to get local issuer certificate"

问题开始于今天,当我升级tortoisegit并要求关闭某些应用程序时,其中有一个资源管理器,我担心它以错误的方式杀死了它,并且某些东西损坏了.

The problem started today when I upgraded tortoisegit and it asked to close some applications, among which there was explorer and I'm afraid that it killed it in the wrong way and something got corrupted.

推荐答案

似乎您弄乱了访问令牌.我建议您为计算机设置新的SSH密钥,并将其添加到GitHub存储库中. 您可以关注

Seems like you messed up your access token. I recommend you to setup new SSH keys for your machine and add them to GitHub repo. You can Follow this official help page from github.

不使用SSH进行克隆的另一种方法是使用HTTPS进行克隆,此处克隆的语法与公共存储库略有不同. 对于公共回购,您就像

Another way to clone without SSH is to clone using HTTPS, here the syntax for the clone is slightly different from public repositories. For public repos, you go like

git clone https://github.com/myUserName/myProject.git

对于私人回购,您就像

git clone https://myUserName:myGithubPassword@github.com/myUserName/myProject.git

注意:

  • If your password contains special characters, you will need to convert password with special characters to UTF-8 encoding. You can take replace guide from here. Or you can use this javaScript code to convert your password and use generated password console.log(encodeURIComponent('password_of_the_form@$123'));
  • If you use 2FA to secure your GitHub account then follow this

这篇关于无法从github克隆或提取的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆