Skip to contentSkip to conversation

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

DISCUSSION git_user101 2 participants 11 messages Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

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,

Signature · 2 lines
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.
#1 lore raw

git_user101 venit, vidit, dixit 17.05.2010 01:18:

Quoted 9 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'

Quoted 4 lines

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

#2 lore raw

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.

Signature · 2 lines
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.
#3 lore raw

git_user101 venit, vidit, dixit 17.05.2010 10:17:

Quoted 7 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

#4 lore raw

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'

Signature · 2 lines
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.
#5 lore raw

git_user101 venit, vidit, dixit 17.05.2010 13:09:

Quoted 6 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

#6 lore raw

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.

Signature · 2 lines
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.
#7 lore raw

git_user101 venit, vidit, dixit 17.05.2010 14:13:

Quoted 7 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.]

Quoted 2 lines

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

#8 lore raw

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.

Signature · 2 lines
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.
#9 lore raw

git_user101 venit, vidit, dixit 17.05.2010 14:48:

Quoted 17 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$
Quoted 1 line

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

#10 lore raw

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

Signature · 2 lines
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.