[英]Why am I getting fatal: Authentication failed for <repo URL>
I just got started on Github again, and created a new repo.我刚刚开始使用 Github,并创建了一个新的仓库。 It's a private repo, so I use
git clone <URL_clone_link>
, and it prompts for username and password (both of which I've verified are correct), but ends with the fatal error in the Title.这是一个私人仓库,所以我使用
git clone <URL_clone_link>
,它提示输入用户名和密码(我已经验证这两个都是正确的),但以标题中的致命错误结束。
I'm using a terminal on a relatively new iMac, and it doesn't seem to be a local machine issue.我在相对较新的 iMac 上使用终端,这似乎不是本地机器问题。 I just don't understand why it won't authenticate me using the same username/pwd I use to log in.
我只是不明白为什么它不会使用我用来登录的相同用户名/密码对我进行身份验证。
First, check that, as commented, you have 2FA activated .首先,检查您是否已激活 2FA 。
If yes, the password to enter would be a PAT (Personal Access Token) that you would need to generate and add to your tokens .如果是,输入的密码将是您需要生成并添加到您的令牌的 PAT(个人访问令牌)。
Second, check your git config credential.helper
output: if osxkeychai
y, you might need to do:其次,检查您的
git config credential.helper
output:如果osxkeychai
y,您可能需要执行以下操作:
git credential-osxkeychain erase https://github.com
In order to remove the password cached by the osxkeychain
credential caching setup.为了删除
osxkeychain
凭证缓存设置缓存的密码。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.