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

11 messages from 2010-05-16 to 2010-05-17. Participants: git_user101, Michael J Gruber.
Thread: https://gitlist.dev/t/23822

## git_user101, 2010-05-16 23:18

Subject: Error: Unable to append to logs/HEAD: Permission denied
Message-ID: <1274051912050-5063068.post@n2.nabble.com>
URL: https://gitlist.dev/e/1274051912050-5063068.post%40n2.nabble.com

```

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, 2010-05-17 07:54

Subject: Re: Error: Unable to append to logs/HEAD: Permission denied
Message-ID: <4BF0F63A.1080005@drmicha.warpmail.net>
URL: https://gitlist.dev/e/4BF0F63A.1080005%40drmicha.warpmail.net
In-Reply-To: <1274051912050-5063068.post@n2.nabble.com>

```
git_user101 venit, vidit, dixit 17.05.2010 01:18:
> 
> 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, 2010-05-17 08:17

Subject: Re: Error: Unable to append to logs/HEAD: Permission denied
Message-ID: <1274084247216-5064104.post@n2.nabble.com>
URL: https://gitlist.dev/e/1274084247216-5064104.post%40n2.nabble.com
In-Reply-To: <4BF0F63A.1080005@drmicha.warpmail.net>

```

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, 2010-05-17 09:02

Subject: Re: Error: Unable to append to logs/HEAD: Permission denied
Message-ID: <4BF10623.5000705@drmicha.warpmail.net>
URL: https://gitlist.dev/e/4BF10623.5000705%40drmicha.warpmail.net
In-Reply-To: <1274084247216-5064104.post@n2.nabble.com>

```
git_user101 venit, vidit, dixit 17.05.2010 10:17:
> 
> 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, 2010-05-17 11:09

Subject: Re: Error: Unable to append to logs/HEAD: Permission denied
Message-ID: <1274094574729-5064574.post@n2.nabble.com>
URL: https://gitlist.dev/e/1274094574729-5064574.post%40n2.nabble.com
In-Reply-To: <4BF10623.5000705@drmicha.warpmail.net>

```

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, 2010-05-17 11:40

Subject: Re: Error: Unable to append to logs/HEAD: Permission denied
Message-ID: <4BF12B11.2090002@drmicha.warpmail.net>
URL: https://gitlist.dev/e/4BF12B11.2090002%40drmicha.warpmail.net
In-Reply-To: <1274094574729-5064574.post@n2.nabble.com>

```
git_user101 venit, vidit, dixit 17.05.2010 13:09:
> 
> 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, 2010-05-17 12:13

Subject: Re: Error: Unable to append to logs/HEAD: Permission denied
Message-ID: <1274098383422-5064764.post@n2.nabble.com>
URL: https://gitlist.dev/e/1274098383422-5064764.post%40n2.nabble.com
In-Reply-To: <4BF12B11.2090002@drmicha.warpmail.net>

```

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, 2010-05-17 12:26

Subject: Re: Error: Unable to append to logs/HEAD: Permission denied
Message-ID: <4BF135D8.70106@drmicha.warpmail.net>
URL: https://gitlist.dev/e/4BF135D8.70106%40drmicha.warpmail.net
In-Reply-To: <1274098383422-5064764.post@n2.nabble.com>

```
git_user101 venit, vidit, dixit 17.05.2010 14:13:
> 
> 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, 2010-05-17 12:48

Subject: Re: Error: Unable to append to logs/HEAD: Permission denied
Message-ID: <1274100503553-5064900.post@n2.nabble.com>
URL: https://gitlist.dev/e/1274100503553-5064900.post%40n2.nabble.com
In-Reply-To: <4BF135D8.70106@drmicha.warpmail.net>

```

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, 2010-05-17 13:35

Subject: Re: Error: Unable to append to logs/HEAD: Permission denied
Message-ID: <4BF1463D.9040408@drmicha.warpmail.net>
URL: https://gitlist.dev/e/4BF1463D.9040408%40drmicha.warpmail.net
In-Reply-To: <1274100503553-5064900.post@n2.nabble.com>

```
git_user101 venit, vidit, dixit 17.05.2010 14:48:
> 
> 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, 2010-05-17 19:02

Subject: Re: Error: Unable to append to logs/HEAD: Permission denied
Message-ID: <1274122926805-5066526.post@n2.nabble.com>
URL: https://gitlist.dev/e/1274122926805-5066526.post%40n2.nabble.com
In-Reply-To: <4BF1463D.9040408@drmicha.warpmail.net>

```

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.

```
