'Why do I have problems with loging in to Overleaf via git
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?
Solution 1:[1]
I had the same problem.
While setting email and password using git config did not work, what did work was:
- forcing a user and password prompt (Git: force user and password prompt) by disabling the
credential.helper(How do I disable git's credential helper for a single repository?)
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.
Solution 2:[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.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | |
| Solution 2 | Nathan Musoke |
