首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >为什么我在通过git登录到Overleaf时会遇到问题?

为什么我在通过git登录到Overleaf时会遇到问题?
EN

Stack Overflow用户
提问于 2019-12-12 03:50:42
回答 3查看 2K关注 0票数 4

我想使用git和overleaf之间的连接(在带有git bash的Windows10上)。有一次它起作用了,但现在我总是得到错误。

代码语言:javascript
复制
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/'

我通过以下方式设置用户名和密码:

代码语言:javascript
复制
git config --global user.name "mail@domain.com"
git config --global user.email "mail@domain.com"
git config --global user.password "**********"

几天前它曾经有效过一次。在那里,我问我口令和名字。但现在这种情况已经改变了。你有什么意见建议?

EN

回答 3

Stack Overflow用户

发布于 2020-12-20 06:11:52

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

代码语言:javascript
复制
[credential "https://git.overleaf.com"]
    username = your@email
    helper = store
票数 7
EN

Stack Overflow用户

发布于 2020-03-07 03:09:10

我也有同样的问题。

虽然使用git config设置电子邮件和密码不起作用,但起作用的是:

通过禁用(How do I disable git's credential helper for a single repository?)

所以我运行了git config --global credential.helper。下一次我使用上页存储库运行git clonegit pushgit pull时,会出现一个提示,要求输入我的下页用户名和密码。正确输入凭据在那里起作用。

票数 1
EN

Stack Overflow用户

发布于 2021-12-22 16:50:22

有些人可能更喜欢从命令行进行配置。@pavel的等效方法是运行以下命令

代码语言:javascript
复制
git config --global credential.https://git.overleaf.com.username your@email
git config --global credential.https://git.overleaf.com.helper store

这将导致全局配置~/.gitconfig

或者,可以通过用--local替换--global来为不同的项目指定不同的配置。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/59293055

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档