6

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
  • 134
  • 1
  • 10
  • 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

3 Answers3

9

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

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

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
  • 91
  • 8
1

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
  • 146
  • 11
ya wei
  • 19
  • 3