threads / discuss / 23822

Error: Unable to append to logs/HEAD: Permission denied

Subject: Error: Unable to append to logs/HEAD: Permission denied

## tl;dr

11 messages between May 16, 2010 and May 17, 2010.

replies: 10people: 2as markdown or json

git_user101· May 16, 2010, 23:18 UTC · lore

Hi, when I use the command: git push I get these two errors: ... error: Unable to append to logs/HEAD: Permission denied ... error: failed to push some refs to 'ssh://remote server'

However, the changes are pushed in the remote repository.

Does somebody have any ideas? Thanx,

-- 
View this message in context: http://git.661346.n2.nabble.com/Error-Unable-to-append-to-logs-HEAD-Permission-denied-tp5063068p5063068.html
Sent from the git mailing list archive at Nabble.com.
Michael J Gruber· May 17, 2010, 07:54 UTC · re: git_user101 · lore

Re: Error: Unable to append to logs/HEAD: Permission denied

git_user101 venit, vidit, dixit 17.05.2010 01:18:
Show 13 quoted lines
> 
> Hi,
> when I use the command: git push
> I get these two errors:
> ...
> error: Unable to append to logs/HEAD: Permission denied
> ...
> error: failed to push some refs to 'ssh://remote server'
> 
> However, the changes are pushed in the remote repository.
> 
> Does somebody have any ideas?
> Thanx,

Is this a shared repo by any chance (i.e. accessed by different user ids, not just by different people using the same git-account)?

Michael
git_user101· May 17, 2010, 08:17 UTC · re: Michael J Gruber · lore

Re: Error: Unable to append to logs/HEAD: Permission denied

yes! This is about a shared repository that is allowed to be accessed by its owner and group. The group consists of some machine users. Users have different accounts and modify the git-repository by own account.

-- 
View this message in context: http://git.661346.n2.nabble.com/Error-Unable-to-append-to-logs-HEAD-Permission-denied-tp5063068p5064104.html
Sent from the git mailing list archive at Nabble.com.
Michael J Gruber· May 17, 2010, 09:02 UTC · re: git_user101 · lore

Re: Error: Unable to append to logs/HEAD: Permission denied

git_user101 venit, vidit, dixit 17.05.2010 10:17:
Show 7 quoted lines
> 
> yes!
> This is about a shared repository that is allowed to be accessed by its
> owner and group.
> The group consists of some machine users.
> Users have different accounts and modify the git-repository by own account.
> 

Then you might want to read up on core.sharedRepository in git config's man page and set it according to your situation (all users in the same group, e.g.). Also, you'll have to fix-up permissions manually at least on logs/HEAD (and probably others).

Cheers, Michael

git_user101· May 17, 2010, 11:09 UTC · re: Michael J Gruber · lore

Re: Error: Unable to append to logs/HEAD: Permission denied

after configuring git and setting core.sharedRepository to true at server side, I do not get the first error any more. But the second one still appears on the screen after every push. error: failed to push some refs to 'ssh://remote server'

-- 
View this message in context: http://git.661346.n2.nabble.com/Error-Unable-to-append-to-logs-HEAD-Permission-denied-tp5063068p5064574.html
Sent from the git mailing list archive at Nabble.com.
Michael J Gruber· May 17, 2010, 11:40 UTC · re: git_user101 · lore

Re: Error: Unable to append to logs/HEAD: Permission denied

git_user101 venit, vidit, dixit 17.05.2010 13:09:
Show 6 quoted lines
> 
> after configuring git and setting core.sharedRepository to true at server
> side, I do not get the first error any more. But the second one still
> appears on the screen after every push.
> error: failed to push some refs to 'ssh://remote server'
> 

That means that in addition to the 1st part, you'll also have to follow the 2nd part of my advice ;)

Michael
git_user101· May 17, 2010, 12:13 UTC · re: Michael J Gruber · lore

Re: Error: Unable to append to logs/HEAD: Permission denied

Thank you, Michael! I do not understand what you exactly mean with "Also, you'll have to fix-up permissions manually at least on logs/HEAD (and probably others)" If you mean that I have to change the permission of logs/HEAD to read, write for the group, it is already done. All files and directories in the repository are accessible for the group.

-- 
View this message in context: http://git.661346.n2.nabble.com/Error-Unable-to-append-to-logs-HEAD-Permission-denied-tp5063068p5064764.html
Sent from the git mailing list archive at Nabble.com.
Michael J Gruber· May 17, 2010, 12:26 UTC · re: git_user101 · lore

Re: Error: Unable to append to logs/HEAD: Permission denied

git_user101 venit, vidit, dixit 17.05.2010 14:13:
Show 7 quoted lines
> 
> Thank you, Michael!
> I do not understand what you exactly mean with "Also, you'll have to fix-up
> permissions manually at least
> on logs/HEAD (and probably others)"
> If you mean that I have to change the permission of logs/HEAD to read, write
> for the group,

I meant all files & dirs under ${repo}.git should be owned by the group and +rw for the group. ["All" is actually overkill but sufficient.]

> it is already done.
> All files and directories in the repository are accessible for the group.

Hmm. If really all files and dirs (!) are group writeable I'm puzzled. What is the complete report and error message (besides failed to push)?

A push can also fail due to non fast-forward, of course.
Michael
git_user101· May 17, 2010, 12:48 UTC · re: Michael J Gruber · lore

Re: Error: Unable to append to logs/HEAD: Permission denied

The push is succeed but I get this error every time. This is de complete message:

user@desktop:~/Documents/LRSystems$ git push 
user@server's password: 
Counting objects: 5, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 302 bytes, done.
Total 3 (delta 2), reused 0 (delta 0)
To ssh://user@server:port/repositories/LRSystems
   1143c0..50b610  master -> master
error: failed to push some refs to
'ssh://user@server:port/repositories/LRSystems'
user@desktop:~/Documents/LRSystems$
As you can see the push is done but I get the error.
-- 
View this message in context: http://git.661346.n2.nabble.com/Error-Unable-to-append-to-logs-HEAD-Permission-denied-tp5063068p5064900.html
Sent from the git mailing list archive at Nabble.com.
Michael J Gruber· May 17, 2010, 13:35 UTC · re: git_user101 · lore

Re: Error: Unable to append to logs/HEAD: Permission denied

git_user101 venit, vidit, dixit 17.05.2010 14:48:
Show 18 quoted lines
> 
> The push is succeed but I get this error every time. This is de complete
> message:
> 
> user@desktop:~/Documents/LRSystems$ git push 
> user@server's password: 
> Counting objects: 5, done.
> Delta compression using up to 8 threads.
> Compressing objects: 100% (3/3), done.
> Writing objects: 100% (3/3), 302 bytes, done.
> Total 3 (delta 2), reused 0 (delta 0)
> To ssh://user@server:port/repositories/LRSystems
>    1143c0..50b610  master -> master
> error: failed to push some refs to
> 'ssh://user@server:port/repositories/LRSystems'
> user@desktop:~/Documents/LRSystems$
> 
> As you can see the push is done but I get the error.
Is the repo on the server side in a good state? I.e., if you do

git status git fsck git show-ref

in the server side repo, is there something strange? Another thing worth trying would be to

git clone --shared --mirror LRSystems LRSystems-new
and check whether pushing to that freshly set-up repo works.
Michael
git_user101· May 17, 2010, 19:02 UTC · re: Michael J Gruber · lore

Re: Error: Unable to append to logs/HEAD: Permission denied

Thanks Michael! I solved the problem by making a new repository on the server and cloning to the local computer.

-- 
View this message in context: http://git.661346.n2.nabble.com/Error-Unable-to-append-to-logs-HEAD-Permission-denied-tp5063068p5066526.html
Sent from the git mailing list archive at Nabble.com.

← back to recent threads