8

I want to use the connection between git and overleaf (on Windows 10 with git bash). One time it worked, but now I get always errors.

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/'

I set username and password via:

git config --global user.name "mail@domain.com"
git config --global user.email "mail@domain.com"
git config --global user.password "**********"

It worked once some days ago. There I Overleaf asked me for password and name. But this has changed now. Do you have any suggestions?

Zeitproblem
  • 165
  • 1
  • 12
  • May you check their documentation? – evolutionxbox Dec 13 '19 at 03:44
  • when you mean this: https://www.overleaf.com/blog/195 , I already tried all mentioned things there. Every where I'm looking for, it says save your user name and stuff via git config and as you can see, I already did it. – Zeitproblem Dec 14 '19 at 18:18
  • Maybe see also [macos - How do I update the password for Git? - Stack Overflow](https://stackoverflow.com/questions/20195304/how-do-i-update-the-password-for-git). That having said in my case the issue is I type `MAIL@domain.com` instead of `mail@domain.com` (which the web interface accept, but git reject). Always go to https://www.overleaf.com/user/settings to check what the proper capitalization of the email is. – user202729 Mar 28 '23 at 13:23

3 Answers3

13

To store username and password for Overleaf, add the following to your .gitconfig:

[credential "https://git.overleaf.com"]
    username = your@email
    helper = store
pavel
  • 246
  • 2
  • 5
2

I had the same problem.

While setting email and password using git config did not work, what did work was:

So I ran git config --global credential.helper. The next time I ran git clone, git push, or git pull with the Overleaf repository, a prompt appears asking for my overleaf username and password. Correctly entering the credentials there worked.

Christoph
  • 101
  • 1
  • 9
2

Someone may prefer configuration from the command line. The equivalent way to @pavel is to run the following commands

git config --global credential.https://git.overleaf.com.username your@email
git config --global credential.https://git.overleaf.com.helper store

This will result in the config ~/.gitconfig globally.

Alternatively, one can specify different configurations for different projects by replacing --global with --local.

Nathan Musoke
  • 166
  • 1
  • 12
ya wei
  • 77
  • 5