Aldine / Clone Overleaf with git
How to clone an Overleaf project with git, and what to do when it fails
Run git clone https://git.overleaf.com/<project-id>. When git asks for a username, type git. The password is not your Overleaf password: it is a git authentication token from your account settings. Everything else on this page is detail and troubleshooting.
Written by the Aldine project, so read it with that in mind. Statements about other products are taken from the linked pages of that product's own documentation. Checked on 24 November 2026.
This page is the step-by-step. For how Overleaf's git integration works in general and which plans include it, see git with Overleaf. Linking a project to a GitHub repository is a separate feature, covered in Overleaf GitHub sync.
The short version
git clone https://git.overleaf.com/1234567
Username: git
Password: <your git authentication token>
Overleaf's documentation puts it in one line: "When performing Git operations, use the username "git" and use the authentication token as the password." (Overleaf docs: Git integration authentication tokens, as of November 2026)
On overleaf.com this only works for projects whose owner has git integration. In Overleaf's words, it "is a premium feature, so it will only be available if the project owner has a paid subscription to Overleaf or has been granted access to the feature". (Overleaf docs: Git integration, as of November 2026)
Find the git URL and project ID
Two ways. Inside the project, select Git from the Integrations menu on the left; a dialog shows the full clone command with the URL in it. Or read it off the address bar. A project at https://www.overleaf.com/project/1234567 has the ID 1234567, and its git URL is https://git.overleaf.com/1234567. (Overleaf docs: Git integration, as of November 2026)
The command in the dialog already has the username in it, as https://git@git.overleaf.com/1234567, so git won't ask for one. (Overleaf docs: Git integration authentication tokens, as of November 2026)
Self-hosted Server Pro uses your own host instead: the docs give https://<SHARELATEX_SITE_URL>/git/1234567, where the placeholder is the host your administrator set. Git-bridge "is not enabled by default in Server Pro", so if the Git option is missing, that is a question for whoever runs the server. (Overleaf docs: Git integration, as of November 2026)
Create an authentication token
Tokens live in your Overleaf account settings, where you create and delete them. If you have never made one, the Git dialog in a project offers a Generate token button as well. The rules, from Overleaf's token page:
- "Tokens will expire after one year."
- "You can have a maximum of 10 tokens." At the limit, delete old or expired ones before you create another.
- One token covers every project you can reach with git, as owner or as collaborator.
- You can't see a token in full after creating it. Forgot it, and no credential helper saved it? Then you generate a new one.
- Password login for git is gone: "The older username and password-based authentication method is no longer available."
(Overleaf docs: Git integration authentication tokens, as of November 2026)
Collaborators need their own. Overleaf's advice for a co-author who doesn't use Overleaf is to share the project with them so they can create an account, get the git URL and generate a token. Never hand over yours. (Overleaf docs: Git integration authentication tokens, as of November 2026)
Clone
git clone https://git.overleaf.com/1234567 my-paper
cd my-paper
Enter git if a username prompt comes up, then paste the token at the password prompt. Any other git client works the same way, given the URL, git as the username and the token as the password. (Overleaf docs: Git integration authentication tokens, as of November 2026)
New clones are on a branch called main. Older clones may still say master. (Overleaf docs: Git integration, as of November 2026)
Got an old clone that used to work with a password? Point it at the token format and keep the checkout:
git remote set-url origin https://git@git.overleaf.com/1234567
git remote -v
(Overleaf docs: Git integration authentication tokens, as of November 2026)
Stop typing the token every time
Overleaf recommends a git credential helper and gives this command:
git config --global credential.helper store
(Overleaf docs: Git integration authentication tokens, as of November 2026)
Know what store does before you use it, though. Git's own book says it "saves the credentials to a plain-text file on disk, and they never expire", by default in ~/.git-credentials. There are other helpers. cache keeps them in memory and forgets them after 15 minutes unless you pass --timeout. On macOS, git ships an osxkeychain helper that keeps them in the system keychain, and on Windows the Git Credential Manager uses the Windows Credential Store. (Pro Git: credential storage, as of November 2026)
git config --global credential.helper osxkeychain # macOS
git config --global credential.helper 'cache --timeout 3600' # memory, one hour
Pull and push
Ordinary git:
git pull
# edit, then
git add -A
git commit -m "Revise section 3"
git push
What is unusual is where the commits come from. Overleaf keeps its own history, and the docs call the git integration "essentially a translation" of it. A pull or fetch creates a commit on demand if none exists for the current state; a push creates one too. While people type in the browser, no commits appear. If several people edited before a commit was generated, the commit carries the name of whoever made the most recent change. Labelling a version in Overleaf's history forces a commit at that point, which is the documented way to get one commit per co-author's round of edits. (Overleaf docs: Git integration, as of November 2026)
Want the same paper on GitLab or another host as well? The documented route is a local clone with two remotes, one for Overleaf and one for the host, with no direct link between the two. (Overleaf docs: Advanced Git operations, as of November 2026)
Branches and what else isn't supported
"The Overleaf Git system does not support branching." The advanced page is more specific: the integration limits the project to one branch, "hard-coded to be called main". You can still work on a local branch and push it into main with a refspec. The example given uses a remote called overleaf:
git push overleaf my-branch:main
(Overleaf docs: Advanced Git operations, as of November 2026)
The known limitations table lists the rest. (Overleaf docs: Git integration, as of November 2026)
- Tags are not supported.
- Git LFS is not supported.
- Submodules: a project can be a submodule of another repository but can't contain any.
- Symlinks become regular files on Overleaf's side.
- Execute permissions are not kept. The docs suggest
git config core.fileMode falsein your clone. - Renamed folders leave an empty folder with the old name behind.
- Renamed or moved files become a delete plus a create, which can remove tracked changes and comments on them. More generally, Overleaf does "not recommend mixing active use of Git and the use of track changes and/or comments."
Common errors
Repository not found
Overleaf's troubleshooting section says this usually means the wrong URL. Copy it again from Git under Integrations. The same paragraph repeats the plan point: on overleaf.com the integration needs the project owner's paid subscription. So if the URL is right, check whose project it is. (Overleaf docs: Git integration, as of November 2026)
Authentication failed
For this one the troubleshooting section points to the token page, which narrows the causes down. You typed your account password (no longer accepted), or the username was not git, or the token has expired or been deleted. About the last case the docs say: "you will likely see an authentication error reported by your Git client." (Overleaf docs: Git integration authentication tokens, as of November 2026)
The trap after a year is the credential helper, which keeps offering the old token. Tell it to forget the stored entry with git credential reject, a command whose description says it lets the helpers "erase any stored credentials matching the description". (git-credential documentation, as of November 2026)
printf 'protocol=https\nhost=git.overleaf.com\n\n' | git credential reject
git pull # asks again: username git, password = the new token
Push rejected or "failed to push some refs"
Overleaf lists three causes: going over a project's file size or file count limits, or including file types it doesn't handle, such as symlinks or LFS files. If none of those applies, the documented next step is a larger HTTP post buffer, 10 MB instead of the 1 MB default:
git config --global http.postBuffer 10485760
# undo later with
git config --global --unset http.postBuffer
(Overleaf docs: Git integration, as of November 2026) The limits themselves are on Overleaf's plan limits page.
Timeouts and rate limits
A commit with a very large number of changes can time out. Split it into smaller commits, then try the post buffer setting above. Rate limiting, according to Overleaf, does not generally happen with git commands run by hand; it comes from clients that poll the remote automatically, so turn that polling off or down. (Overleaf docs: Git integration, as of November 2026)
How cloning works in Aldine
Aldine is an open-source, self-hosted collaborative LaTeX editor. Every project in it is a real git repository on the server, with branches you create and merge in the browser. The route to a clone on your laptop is different from Overleaf's, though. Aldine's documentation does not describe a git URL on the Aldine server itself. You publish the project to GitHub, GitLab, Gitea or Forgejo from the editor, and a co-author clones that repository and keeps working in VS Code. Their commits come back into Aldine with one Pull.
- Tokens are the host's. You connect a GitHub, GitLab, Gitea or Forgejo account; for the last three a personal access token is enough, without an OAuth app. Pushes go over https with that token.
- Branches carry over. Push, pull and branch switching work with each host, and you can open a pull or merge request from the editor.
- An expired token gets a prompt, not an error wall. The editor says the host rejected the token, names whose it was, and offers Reconnect next to the branch name.
- A token per project. An owner can give one project a token limited to its repository, which everyone who syncs that project then uses.
Aldine has its limits too. It is self-hosted only, and young: first release in July 2026, 1.0 in October 2026. Review works as comments with suggested edits, with no keystroke-level track changes. The self-hosting guide covers setup, which is two containers.
No account, no install. The demo is a shared sandbox and resets every night.
When Overleaf's git integration is the better choice
- You want a git URL on the editor itself. Each Overleaf project has its own clone URL. (Overleaf docs: Git integration, as of November 2026) Aldine's documented route goes through a repository on a git host.
- You don't want to run a server. Overleaf's README says "We run a hosted version at www.overleaf.com". (Overleaf repository README, as of November 2026) Aldine has no hosted service today.
- Your co-authors are already on Overleaf and you just want a local copy to work on in your own editor.
- You use track changes. Overleaf has them as a premium feature; Aldine doesn't (though Overleaf itself advises against mixing them with git pushes, as above). (Overleaf docs: track changes, as of November 2026)
Common questions
What username do I use for Overleaf git?
git. Not your email address. The password is a git authentication token from your Overleaf account settings.
Where do I find my Overleaf project ID?
It is the last part of the project's address in the browser. For https://www.overleaf.com/project/1234567 the ID is 1234567 and the git URL is https://git.overleaf.com/1234567.
Can I push a branch to Overleaf?
Not as a branch. The Overleaf project has one branch, main. You can push a local branch into it with git push overleaf my-branch:main, which updates main.
My token expired. Do I have to clone again?
No. Generate a new token, remove the old one from your credential helper, and run git pull. Git asks for the password again and you paste the new token.
Can a collaborator clone my project with my token?
Overleaf's documentation says not to share tokens. Share the project with them instead; they get the git URL and generate a token of their own.