在工作和我自己的计算机上,我通常使用带有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?
1 回答
以下是github中关于双因子身份验证行为的文档 . 它在命令行上讨论https存储库 . 您可以生成
personal access token
并使用它来登录 .安全的价格是不方便的 . 您也可以暂时禁用两个因子身份验证 .