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 "[email protected]"
git config --global user.email "[email protected]"
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?

3

3 Answers 3

17

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

[credential "https://git.overleaf.com"]
    username = your@email
    helper = store
1
  • 1
    Note: the .gitconfig should be in your home directory
    – jerlich
    Commented Mar 29, 2021 at 9:08
3

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.

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.