ner*_*com 1 git authentication cygwin github
我是个新手.我在github.com上设置了一个具有双因素身份验证的帐户.
我可以在MINGW32 bash shell中使用它,但我正在尝试将它与Cygwin一起使用.
这就是我得到的:
dave@ENOUGH /cygdrive/u/testG
$ git clone https://github.com/nerdfever/<project>
Cloning into '<project>'...
Username for 'https://github.com':
Password for 'https://Nerdfever@github.com':
remote: Invalid username or password.
fatal: Authentication failed for 'https://github.com/nerdfever/<project>/'
Run Code Online (Sandbox Code Playgroud)
我在Cygwin git中设置了user.name和user.email配置.
我需要做些什么来完成这项工作?
我不知道为什么有人向我投降,但无论如何我想出来了:
Git under Cygwin:
a) Install git from Cygwin setup.exe
b) git config --global user.name "<username>"
c) git config --global user.password "<password>"
d) git config --global credential.helper store
e) Get personal access token per https://help.github.com/articles/creating-an-access-token-for-command-line-use/
f) git clone <project>; first time it'll ask for credentials, after that it will store them
Run Code Online (Sandbox Code Playgroud)
请注意,当git要求您输入密码时,请提供您的个人访问令牌(而不是您的密码).