Error codes · Git
PULSE-GIT-003 The repository is occupied by another git process
What does this mean
Pulse wanted to write changes to the repository, but at this moment another program was already writing there. Git only allows one write at a time, so the Pulse action failed. Your files were not affected.
Why does this happen
Before writing, git puts in the folder .git lock file with ending .lock - most often index.lock - and puts it away when finished. While the castle stands, the others wait. It can be held by:
- git in the terminal - yours or the agent's;
- code editor with built-in git;
- agent in another task of the same repository: copies of tasks share one folder
.git.
Pulse itself repeats short commands with a pause if the lock is busy. You see this error when the lock is not released after repetitions or when it is unsafe to repeat a command: merging, sending, receiving changes.
If git is not running anywhere, but the lock is there, it is left over from a process that crashed and did not have time to remove it. Pulse never deletes someone else's lock: it could belong to a live process.
In "More details" git writes Unable to create '…/index.lock': File exists or could not lock config file.
What to do
- Wait for another program to finish: a command in the terminal, synchronization in the editor, the agent's progress in another task.
- Repeat the action in Pulse.
- The error is repeated, and git definitely doesn’t work anywhere: terminals and editors with this project are closed, agents are in the tasks of this repository. Then delete the lock file manually - its path is in “More details”, after the words
Unable to create. Then repeat the action.
When to write to support
Write to us if the lock appears again and again, although nothing except Pulse works with the repository. Click “Send report” in the error card - a report form will open, where the code and details have already been entered, the secrets are hidden in them. Add what you did before the error and click “View and Send”: the window will show exactly what is left - check and click “Submit”. If the cloud is turned off, the button is called “View and save” - send the resulting file to us in any way.