在工作和我自己的计算机上,我通常使用带有ssh密钥的github。 我还通过短信安装了双因素身份验证。 一切正常。
但是当我在另一台计算机上,我没有我的ssh密钥时,我当然无法通过
从我的(私人)存储库结账git clone git@github.com:joergi/myproject.git
但是当我切换到HTTPS版本时,我无法通过
结账git clone https://github.com/joergi/myproject.git
Cloning into 'myproject'...
Username for 'https://github.com': joergi
Password for 'https://joergi@github.com':
remote: Invalid username or password.
fatal: Authentication failed for 'https://github.com/joergi/myproject.git/'
用户名和密码100%正确。
当激活双因素身份验证时,有没有办法使用HTTPS?
答案 0 :(得分:2)
以下是github关于双因子身份验证行为的文档。它在命令行上讨论https存储库。您可以生成personal access token
并使用它来登录。
安全价格带来不便。您也可以暂时禁用两个因子身份验证。