我是git新手。我在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://[email protected]':
remote: Invalid username or password.
fatal: Authentication failed for 'https://github.com/nerdfever/<project>/'
我确实在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
请注意,当git询问您的密码时,请给其提供个人访问令牌(而不是您的密码)。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句