我想使用git和背面(在Windows 10上使用git bash)之间的连接。曾经有一次,但是现在我总是出错。
git clone https://git.overleaf.com/number
Cloning into 'number'...
remote: Please sign in using your email address and Overleaf password.
remote:
remote: *Note*: if you sign in to Overleaf using another provider, such
remote: as Google or Twitter, you need to set a password on your Overleaf
remote: account first. Please see https://www.overleaf.com/blog/195 for
remote: more information.
fatal: Authentication failed for 'https://git.overleaf.com/number/'
我通过以下方式设置用户名和密码:
git config --global user.name "mail@domain.com"
git config --global user.email "mail@domain.com"
git config --global user.password "**********"
它几天前起作用了。我在那儿下页要求我输入密码和名称。但是现在情况已经改变了。你有什么建议吗?
答案 0 :(得分:6)
要存储 Overleaf 的用户名和密码,请将以下内容添加到您的 .gitconfig
:
[credential "https://git.overleaf.com"]
username = your@email
helper = store
答案 1 :(得分:1)
我有同样的问题。
虽然无法使用git config
设置电子邮件和密码,但有效的方法是:
credential.helper
(Git: force user and password prompt)来强制用户和密码提示(How do I disable git's credential helper for a single repository?)所以我跑了git config --global credential.helper
。
下次我使用Overleaf存储库运行git clone
,git push
或git pull
时,出现提示询问我的背面用户名和密码。正确输入那里的凭据有效。