Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Git push fails with error: Cannot lock ref 'HEAD': Unable to create xxxx/HEAD.lock: File Exists

Abhinav Bezgam June 18, 2021

Hi All, I am seeing below error when trying to push to master:

$ git push

Total 0 (delta 0), reused 0 (delta 0)

remote: error: cannot lock ref 'HEAD': Unable to create '/nfs/bitbucket/data/repositories/xxxx/./HEAD.lock': File exists.

remote: 

remote: Another git process seems to be running in this repository, e.g.

remote: an editor opened by 'git commit'. Please make sure all processes

remote: are terminated then try again. If it still fails, a git process

remote: may have crashed in this repository earlier:

remote: remove the file manually to continue.

 

I don't see any .git/HEAD.lock or .git/index.lock files in my repository

Any suggestions on what I can do to resolve this?

1 answer

0 votes
Caroline R
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 5, 2021

Hi, @Abhinav Bezgam! Welcome to the community! 

I saw you created a ticket with our support related to the same question, so to avoid any possible misunderstandings or miscommunication that may arise from discussing the same matter on two different platforms, let’s focus on the ticket instead.

Feel free to share the resolution here to help other community members that may have the same issue. 

Kind regards,
Caroline 

jarkko_lietolahti August 25, 2021

Hi,

 We're seeing this same issue. Under what support ticket is the discussion progressing?

Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 25, 2021

Hi @jarkko_lietolahti and welcome to the community.

A support ticket is visible only to the user that created it and Atlassian staff, it's not publicly visible.

There hasn't been any progress in the support ticket as the reporter hasn't engaged in the discussion.

My suggestion would be that you create a separate question for your issue, providing details on the errors you see and also whether it concerns a Bitbucket Cloud or Bitbucket Server repo. We generally encourage users to create a new question for their issue instead of posting on someone else's question, because 1) the root cause and resolution may be different for each case 2) a question can become cluttered and difficult to follow if we try to troubleshoot multiple users' issues in it.

Please feel free to let me know if you have any questions.

Kind regards,
Theodora

N-Y Corp August 30, 2021

Hello I have the same issue

Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 31, 2021

Hi @N-Y Corp ,

I would like to ask if you could please create a new question for your issue, providing details on the errors you see and also whether it concerns a Bitbucket Cloud or Bitbucket Server repo.

We generally encourage users to create a new question for their issue instead of posting on someone else's question that they have the same issue, because 1) the root cause and resolution may be different for each case 2) a question can become cluttered and difficult to follow if we try to troubleshoot multiple users' issues in it.

Please feel free to let me know if you have any questions.

Kind regards,
Theodora

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events