* permissions and packed-refs?
@ 2008-04-10 12:30 Nigel Magnay
2008-04-10 16:21 ` Robert Haines
0 siblings, 1 reply; 4+ messages in thread
From: Nigel Magnay @ 2008-04-10 12:30 UTC (permalink / raw)
To: git
This is likely a really stupid question... a repo that was working,
has now stopped accepting a push with
Counting objects: 43, done.
Compressing objects: 100% (18/18) Compressing objects: 100% (18/18),
done.
Writing objects: 100% (23/23) Writing objects: 100% (23/23), 4.65 KiB,
done.
Total 23 (delta 10), reused 0 (delta 0)
error: Unable to append to logs/refs/heads/realtime: Permission denied
Pushing to ssh://10.1.3.153/pub/scm/git/git-svn/realtime.git
To ssh://10.1.3.153/pub/scm/git/git-svn/realtime.git
! [remote rejected] realtime -> realtime (failed to write)
error: failed to push some refs to
'ssh://10.1.3.153/pub/scm/git/git-svn/realtime.git'
I think git gc was run on the server at some point, as the head in
question has been shifted into packed-refs.
Server is linux (1.5.4.4) client is msysGit.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: permissions and packed-refs?
2008-04-10 12:30 permissions and packed-refs? Nigel Magnay
@ 2008-04-10 16:21 ` Robert Haines
2008-04-10 18:19 ` Logan Kennelly
0 siblings, 1 reply; 4+ messages in thread
From: Robert Haines @ 2008-04-10 16:21 UTC (permalink / raw)
To: Nigel Magnay; +Cc: git
On 10 Apr 2008, at 13:30, Nigel Magnay wrote:
> This is likely a really stupid question... a repo that was working,
> has now stopped accepting a push with
>
> Counting objects: 43, done.
> Compressing objects: 100% (18/18) Compressing objects: 100% (18/18),
> done.
> Writing objects: 100% (23/23) Writing objects: 100% (23/23), 4.65
> KiB,
> done.
> Total 23 (delta 10), reused 0 (delta 0)
> error: Unable to append to logs/refs/heads/realtime: Permission denied
> Pushing to ssh://10.1.3.153/pub/scm/git/git-svn/realtime.git
> To ssh://10.1.3.153/pub/scm/git/git-svn/realtime.git
> ! [remote rejected] realtime -> realtime (failed to write)
> error: failed to push some refs to
> 'ssh://10.1.3.153/pub/scm/git/git-svn/realtime.git'
>
> I think git gc was run on the server at some point, as the head in
> question has been shifted into packed-refs.
I've seen this after git gc too. Has the owner of the affected files
changed? If so you need to make sure that git gc is run by the
correct user. If you run it as root for example, everything it
touches will end up owned by root!
Cheers,
Rob
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: permissions and packed-refs?
2008-04-10 16:21 ` Robert Haines
@ 2008-04-10 18:19 ` Logan Kennelly
2008-04-10 19:21 ` Nigel Magnay
0 siblings, 1 reply; 4+ messages in thread
From: Logan Kennelly @ 2008-04-10 18:19 UTC (permalink / raw)
To: Robert Haines; +Cc: Nigel Magnay, git
On Apr 10, 2008, at 9:21 AM, Robert Haines wrote:
> I've seen this after git gc too. Has the owner of the affected
> files changed? If so you need to make sure that git gc is run by
> the correct user. If you run it as root for example, everything it
> touches will end up owned by root!
Not only that, but you must make sure that you have the appropriate
umask set. I'm not sure if this affects the pack file, but the reflog
is certainly rewritten in a way that prevents other users from pushing.
I've been meaning to submit a patch to make git better honor
"core.sharedrepository" (it's probably as simple as adding a couple
calls to adjust_shared_perm), but the workaround was so easy that I
had forgotten about the issue.
--
Logan Kennelly
,,,
(. .)
--ooO-(_)-Ooo--
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: permissions and packed-refs?
2008-04-10 18:19 ` Logan Kennelly
@ 2008-04-10 19:21 ` Nigel Magnay
0 siblings, 0 replies; 4+ messages in thread
From: Nigel Magnay @ 2008-04-10 19:21 UTC (permalink / raw)
To: Logan Kennelly; +Cc: Robert Haines, git
Yeah, I think that's probably what's happening. TBH it's a bit of an
ache to have to make sure umasks and things are set correctly, and
it's probably partially that the repo was set up just from a direct
copy of someone's machine.
We've reverted to using a common account user for now.
On Thu, Apr 10, 2008 at 7:19 PM, Logan Kennelly <logank@sent.com> wrote:
> On Apr 10, 2008, at 9:21 AM, Robert Haines wrote:
>
>
> > I've seen this after git gc too. Has the owner of the affected files
> changed? If so you need to make sure that git gc is run by the correct user.
> If you run it as root for example, everything it touches will end up owned
> by root!
> >
>
> Not only that, but you must make sure that you have the appropriate umask
> set. I'm not sure if this affects the pack file, but the reflog is certainly
> rewritten in a way that prevents other users from pushing.
>
> I've been meaning to submit a patch to make git better honor
> "core.sharedrepository" (it's probably as simple as adding a couple calls to
> adjust_shared_perm), but the workaround was so easy that I had forgotten
> about the issue.
>
> --
> Logan Kennelly
> ,,,
> (. .)
> --ooO-(_)-Ooo--
>
>
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-04-10 19:22 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-10 12:30 permissions and packed-refs? Nigel Magnay
2008-04-10 16:21 ` Robert Haines
2008-04-10 18:19 ` Logan Kennelly
2008-04-10 19:21 ` Nigel Magnay
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).