git push return "Error: cannot lock existing info/refs"

Bug #293553 reported by Moisés Rodríguez Carmona
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
git-core (Ubuntu)
New
Undecided
Unassigned

Bug Description

Binary package hint: git-core

When I make a "git push", it returns "Error: cannot lock existing info/refs". I'm working with a server about webdav protocol.My system's administrator say that git push don't send lock command.

I'm using Ubuntu 8.10

P.D: Sorry but english is not my first language.

Revision history for this message
Benjamin Bach (benjaoming) wrote :

You probably need to add and edit ~/.netrc

In the file, you should put hostname, username and password like this:

servername domain.com
username foo
password bar

I had the same issue. It's not a bug, just something that's pretty badly documented and seems to have caused people a lot of headaches.

Revision history for this message
Benjamin Bach (benjaoming) wrote :

Sry. Not like that. Like this:

machine domain.name
login foo
password bar

Revision history for this message
Bjoern Guenzel (h-launchpad-blinker-net) wrote :

I have the same problem with git and webdav. While .netrc solution provides a workaround (thanks for the hint), isn't it a bit unsatisfying? On OS X, git asks for my password, so I did not have to use .netrc. On ubuntu at first I tried supplying basic auth info in the url (user:password@url) which led to the error described here. And that workaround also has me putting my password into a file in clear text.

Also man netrc states that netrc was intended for ftp. I don't really like putting my password into a file that is readable system wide.

Revision history for this message
arnuschky (abrutschy) wrote :

This does not work anymore with karmic. Git always asks me for my password. Can anyone confirm this?

Revision history for this message
Nuno Sucena Almeida (slug-debian) wrote :

arnuschky, I got the same problem as you did, so I removed the username from the .git/config URL, i.e., instead of

[remote "upload"]
        url = https://nuno@192.168.3.123/git/test.git/

i have now:

[remote "upload"]
        url = https://192.168.3.123/git/test.git/

(running lucid here)

Revision history for this message
mio75 (mio75) wrote :

This error message can actually stem from a stale lock file, e. g. after a previous git push died of a signal.
In this case, it will help to delete /var/lock/apache2/DavLock on the server.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.