为什么通过git登录到Overleaf会有问题

时间:2019-12-11 19:50:41

标签: git

我想使用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 "**********"

它几天前起作用了。我在那儿下页要求我输入密码和名称。但是现在情况已经改变了。你有什么建议吗?

2 个答案:

答案 0 :(得分:6)

要存储 Overleaf 的用户名和密码,请将以下内容添加到您的 .gitconfig

[credential "https://git.overleaf.com"]
    username = your@email
    helper = store

答案 1 :(得分:1)

我有同样的问题。

虽然无法使用git config设置电子邮件和密码,但有效的方法是:

所以我跑了git config --global credential.helper。 下次我使用Overleaf存储库运行git clonegit pushgit pull时,出现提示询问我的背面用户名和密码。正确输入那里的凭据有效。