如何在启用 2 因素身份验证时通过 HTTPS 检出私有 github 存储库?
How to checkout a private github repository via HTTPS when 2-factor authentication is on?
在工作和我自己的计算机上,我通常使用 github 和 ssh 密钥。
我还通过短信安装了 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 的关于双因素身份验证行为方式的文档。它讨论了命令行上的 https 存储库。您可以生成一个 personal access token
并使用它来登录。
安全的价格是一个不便。您也可以暂时禁用双重身份验证。
在工作和我自己的计算机上,我通常使用 github 和 ssh 密钥。 我还通过短信安装了 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 的关于双因素身份验证行为方式的文档。它讨论了命令行上的 https 存储库。您可以生成一个 personal access token
并使用它来登录。
安全的价格是一个不便。您也可以暂时禁用双重身份验证。