如何解决致命问题:git [bitbucket] 的身份验证失败
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/52778467/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to resolve fatal: Authentication failed for git [bitbucket]
提问by Muhammad hamed Kamal
I have been facing issue when i fetch or pull in any client. i.e "Tower" and Sourcetree. Everything was going smoothly , i did just update macos into Mojave.
当我获取或拉入任何客户端时,我一直面临问题。即“塔”和Sourcetree。一切都很顺利,我只是将 macos 更新到 Mojave。
But I always get
但我总是得到
Error details: fatal: Authentication failed for 'https://[email protected]/sample/sample.git/'
错误详细信息:致命:“ https://[email protected]/sample/sample.git/”的身份验证失败
回答by flik
You can try this solution:
你可以试试这个解决方案:
git remote add origin https://{username}:{password}@github.com/{username}/project.git
回答by Philip Oakley
The best approach is to use the Git Credentials Manager (https://github.com/Microsoft/Git-Credential-Manager-for-Windows/releases/tag/v1.18.1), or the appropriate cred manager for your OS. Don't put your username/password in the plain text config file (unless it is double blank..)
最好的方法是使用 Git Credentials Manager ( https://github.com/Microsoft/Git-Credential-Manager-for-Windows/releases/tag/v1.18.1) 或适合您操作系统的凭证管理器。不要将您的用户名/密码放在纯文本配置文件中(除非它是双空白..)