2时,通过HTTPS检出私人github存储库

在工作和我自己的电脑上,我通常使用带有ssh密钥的github。 我还通过文本消息安装了2路验证。 一切正常。

但是当我在另一台没有使用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?


这里是来自github的关于两个因素auth行为的文档。 它讨论命令行中的https存储库。 您可以生成personal access token并使用它来登录。

安全性的代价是不便的。 您也可以暂时禁用两个因素认证。

链接地址: http://www.djcxy.com/p/22077.html

上一篇: checkout a private github repository via HTTPS when 2

下一篇: Use password instead of token with 2FA enabled on github