Re: [PATCH 1/2] store submodule in common dir

2018-08-15 Thread Joakim Tjernlund
On Wed, 2018-08-15 at 10:28 +0200, Joakim Tjernlund wrote:
> On Tue, 2018-08-14 at 16:20 -0700, Junio C Hamano wrote:
> > CAUTION: This email originated from outside of the organization. Do not 
> > click links or open attachments unless you recognize the sender and know 
> > the content is safe.
> > 
> > 
> > Junio C Hamano  writes:
> > 
> > > My understanding of what Joakim wants to do is to have a top-level
> > > project that has three subdirectories, e.g. kernel/v2.2, kernel/v2.4
> > > and kernel/v2.6, each of which is a submodule that houses these
> > > versions of Linux kernel source, but only clone Linus's repository
> > > (as the up-to-late tree has all the necessary history to check out
> > > these past development tracks).  And that should be doable with
> > > just the main checkout, without any additional worktree (it's just
> > > the matter of having .git/modules/kernel%2fv2.6/ directory pointed
> > > by two symlinks from .git/modules/kernel%2fv2.[24], or something
> > > like that).
> > 
> > Actually I take the last part of that back.  When thought naively
> > about, it may appear that it should be doable, but because each of
> > the modules/* directory in the top-level project has to serve as the
> > $GIT_DIR for each submodule checkout, and the desire is to have
> > these three directories to have checkout of three different
> > branches, a single directory under modules/. that is shared among
> > three submodules would *not* work---they must have separate index,
> > HEAD, etc.
> > 
> > Theoretically we should be able to make modules/kernel%2fv2.[24]
> > additional "worktree"s of modules/kernel%2fv2.6, but given that
> > these are all "bare" repositories without an attached working tree,
> > I am not sure how that would supposed to work.  Thinking about
> > having multiple worktrees on a single bare repository makes me head
> > spin and ache X-<;-)
> 
> You nailed it ! :)
> My head spins just reading this so I think I got my answer. I can be done
> but will be tricky to impl. 
> I will keep an eye on how submodules develops, sure would be a welcome 
> feature.
> 
>  Jocke

On a related note, it would be great if git could support sparse checkout/clone
for submodules, now one have to manually add .git/info/sparse-checkout.
If sparse clone and sparse checkout could be saved in the submodule, then there
would be no problem with 3 copies of the same repo in my submodules.

 Jocke


Re: [PATCH 1/2] store submodule in common dir

2018-08-15 Thread Joakim Tjernlund
On Tue, 2018-08-14 at 16:20 -0700, Junio C Hamano wrote:
> CAUTION: This email originated from outside of the organization. Do not click 
> links or open attachments unless you recognize the sender and know the 
> content is safe.
> 
> 
> Junio C Hamano  writes:
> 
> > My understanding of what Joakim wants to do is to have a top-level
> > project that has three subdirectories, e.g. kernel/v2.2, kernel/v2.4
> > and kernel/v2.6, each of which is a submodule that houses these
> > versions of Linux kernel source, but only clone Linus's repository
> > (as the up-to-late tree has all the necessary history to check out
> > these past development tracks).  And that should be doable with
> > just the main checkout, without any additional worktree (it's just
> > the matter of having .git/modules/kernel%2fv2.6/ directory pointed
> > by two symlinks from .git/modules/kernel%2fv2.[24], or something
> > like that).
> 
> Actually I take the last part of that back.  When thought naively
> about, it may appear that it should be doable, but because each of
> the modules/* directory in the top-level project has to serve as the
> $GIT_DIR for each submodule checkout, and the desire is to have
> these three directories to have checkout of three different
> branches, a single directory under modules/. that is shared among
> three submodules would *not* work---they must have separate index,
> HEAD, etc.
> 
> Theoretically we should be able to make modules/kernel%2fv2.[24]
> additional "worktree"s of modules/kernel%2fv2.6, but given that
> these are all "bare" repositories without an attached working tree,
> I am not sure how that would supposed to work.  Thinking about
> having multiple worktrees on a single bare repository makes me head
> spin and ache X-<;-)

You nailed it ! :)
My head spins just reading this so I think I got my answer. I can be done
but will be tricky to impl. 
I will keep an eye on how submodules develops, sure would be a welcome feature.

 Jocke


git submodule: 3 modules same git repo?

2018-08-14 Thread Joakim Tjernlund
I am trying to create 3 submodules from the same git repo, each pointing to a 
different branch.
Since the repo is somewhat large, I don't want the 3 submodules to clone the 
same repo 3
times, I want one clone and then have the 3 submodules to point to different 
commits.

Is this possible? If not, could it be added?

  Jocke


Re: Unable to create temporary file '/var/git/tmv3-target-overlay.git/shallow_Un8ZOR': Permission denied

2015-09-23 Thread Joakim Tjernlund
On Wed, 2015-09-23 at 13:10 +0200, Johannes Schindelin wrote:
> Hi Joakim,
> 
> On 2015-09-22 22:58, Joakim Tjernlund wrote:
> > On Tue, 2015-09-22 at 22:00 +0200, Johannes Schindelin wrote:
> > > 
> > > The reason should be easy to understand: Git's concept is based on the 
> > > idea that you have full control
> > > over
> > > your repository. Other repositories you might only have read access.
> > 
> > Yes and some repos I only have partial write access to(config, hooks
> > etc. might be readonly)
> 
> The partial write access idea is definitely not part of the original idea of 
> Git, and your use case is
> actually the first I heard of.

Ouch, that cannot be so?? The first thing one would do for some level of 
accident protection 
would be to just change privs on a few selected files/dirs. 

> 
> The original idea was really that you either own your repository, or you do 
> not. And that includes the
> repositories that can be accessed publicly: you own them or you don't.
> 
> Now, I know that in particular in some corporate setups, there needs to be a 
> permission system in place that
> disallows certain users from doing certain things (such as editing the 
> config).

Exactly! This is what we are doing.

> 
> The Git solution is to set up a server, usually with SSH, and allow users to 
> push and fetch from the
> repositories, but nothing else (i.e. no shell access), then set up hooks to 
> implement the permission system.

But this is too big of an ax just to get any protection at all. Dedicating a 
server just for this
is very costly, both the physical/virtual server and to maintain it. 

> 
> This is much less error prone than partially locking down a repository on 
> some network drive because the
> file system structure simply does not reflect the permission structure. That 
> is where all your troubles come
> from.

Sure, but here is room for improvement.

 Jocke
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Unable to create temporary file '/var/git/tmv3-target-overlay.git/shallow_Un8ZOR': Permission denied

2015-09-22 Thread Joakim Tjernlund
On Tue, 2015-09-22 at 22:00 +0200, Johannes Schindelin wrote:
> Hi Joakim,
> 
> On 2015-09-21 19:08, Joakim Tjernlund wrote:
> > On Mon, 2015-09-21 at 09:48 -0700, Junio C Hamano wrote:
> > > Duy Nguyen <pclo...@gmail.com> writes:
> > > 
> > > > Is it really necessary to remove write access in $GIT_DIR? Do we (git
> > > > devs) have some guidelines about things in $GIT_DIR?
> > > 
> > > Those who are allowed to "git push" into it should be able to write
> > > there.  It is a different matter that "git" program itself may make
> > > a policy decision to disallow some operations that the filesystem
> > > bits alone would have allowed (e.g. you can arrange the "pusher" to
> > > only come over the wire via "receive-pack" and "receive-pack" may
> > > deliberately lack support for writing into $GIT_DIR/config).
> > > 
> > 
> > I view $GIT_DIR similar to "/" and "/tmp". Normally one does not let
> > normal users write to "/"
> > as you want to keep this level clean. It is not obvious to everybody
> > what files are important
> > under $GIT_DIR when mixed with tmp files etc.
> > $GIT_DIR/tmp would solve this nicely.
> 
> By now it is pretty clear that you won't find many people here you share your 
> opinion about locking down the
> Git directory.

So I note.

> 
> The reason should be easy to understand: Git's concept is based on the idea 
> that you have full control over
> your repository. Other repositories you might only have read access.

Yes and some repos I only have partial write access to(config, hooks etc. might 
be readonly) 

> 
> But this idea you have, to somehow introduce fine-grained levels of control, 
> this idea would imply that all
> of a sudden Git is no longer free to write to its files as it likes. And as 
> far as Git is concerned,
> everything inside .git/ *are* its files.

This does not compute for me, files inside git are git's files, I only think 
that not all users
to a repo should have the same (write) access. In this case it mostly to 
protect the repo from "creative"
users and accidents.

> 
> So in essence, the core concept of Git -- you clone a repository you cannot 
> write to so that you have a
> local repository you can do *anything you like* to -- is pretty much 
> incompatible with this idea of a
> selective lock down of files in .git/ that not only would require you to know 
> very exactly what files Git
> might want to write, but also to keep yourself up-to-date with Git's 
> development as to which files it might


Don't see how I can avoid some of that if you want to protect areas of the repo 
from accidents etc.

> want to write for *every* new version. Making only .git/tmp/ a writable 
> location further fails to
> acknowledge the fact that the hierarchy of to-be-written files follows the 
> function of those files, not any


Curious, how would you set up some level of protection on a repo?

A .git/tmp/ would make housekeeping easier, you would know that every file 
under .git
should be there and if you find something you don't recognize you would react.

> write permission hierarchy. Since the idea seems so alien to Git's core 
> concept, I called it "overzealous".
> If that hurt your feelings, I am sorry and would like to apologize.

No feelings hurt, I too regret my choise of words.

> Having said all that, I believe that reiterating this idea without pointing 
> to any benefit will continue to
> fail to convince people that the idea is sound and that Git's core concept 
> should change. If you need to
> exert more control in a specific repository, you simply make it accessible 
> only as a non-file-system remote
> (where only `git`, `git-receive-pack` and `git-upload-pack` are allowed to be 
> executed) and define hooks
> that can accept or deny on a *much* finer level than file system permissions 
> ever could, after all.

Even if I did go through this hassle, I would prefer if temporary data were put 
somewhere else
than .git/ as I think mixing config/persistent data with temporary data in the 
same directory is something
that should be avoided.

Anyhow, I see that this idea is not something upstream agrees on so I will back 
off now.

  Jocke--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Unable to create temporary file '/var/git/tmv3-target-overlay.git/shallow_Un8ZOR': Permission denied

2015-09-21 Thread Joakim Tjernlund
On Mon, 2015-09-21 at 09:48 -0700, Junio C Hamano wrote:
> Duy Nguyen  writes:
> 
> > Is it really necessary to remove write access in $GIT_DIR? Do we (git
> > devs) have some guidelines about things in $GIT_DIR?
> 
> Those who are allowed to "git push" into it should be able to write
> there.  It is a different matter that "git" program itself may make
> a policy decision to disallow some operations that the filesystem
> bits alone would have allowed (e.g. you can arrange the "pusher" to
> only come over the wire via "receive-pack" and "receive-pack" may
> deliberately lack support for writing into $GIT_DIR/config).
> 

I view $GIT_DIR similar to "/" and "/tmp". Normally one does not let normal 
users write to "/"
as you want to keep this level clean. It is not obvious to everybody what files 
are important
under $GIT_DIR when mixed with tmp files etc.
$GIT_DIR/tmp would solve this nicely.

 Jocke--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Unable to create temporary file '/var/git/tmv3-target-overlay.git/shallow_Un8ZOR': Permission denied

2015-09-20 Thread Joakim Tjernlund
On Sat, 2015-09-19 at 09:13 +0200, Johannes Schindelin wrote:
> Hi Duy,
> 
> On 2015-09-19 04:21, Duy Nguyen wrote:
> > On Thu, Sep 17, 2015 at 11:54 PM, Joakim Tjernlund
> > <joakim.tjernl...@transmode.se> wrote:
> > > On Thu, 2015-09-17 at 20:18 +0700, Duy Nguyen wrote:
> > > > On Mon, Sep 14, 2015 at 10:37 PM, Joakim Tjernlund
> > > > <joakim.tjernl...@transmode.se> wrote:
> > > > > On Mon, 2015-08-31 at 16:56 +0700, Duy Nguyen wrote:
> > > > > > On Fri, Aug 21, 2015 at 6:36 PM, Joakim Tjernlund
> > > > > > <joakim.tjernl...@transmode.se> wrote:
> > > > > > > I cannot push:
> > > > > > > # > git push origin
> > > > > > > Login for jo...@git.transmode.se
> > > > > > > Password:
> > > > > > > Counting objects: 7, done.
> > > > > > > Delta compression using up to 4 threads.
> > > > > > > Compressing objects: 100% (7/7), done.
> > > > > > > Writing objects: 100% (7/7), 13.73 KiB | 0 bytes/s, done.
> > > > > > > Total 7 (delta 4), reused 0 (delta 0)
> > > > > > > fatal: Unable to create temporary file 
> > > > > > > '/var/git/tmv3-target-overlay.git/shallow_Un8ZOR':
> > > > > > > Permission
> > > > > > > denied
> > 
> > I'm about to do it, but now I'm not sure if I should move
> > shallow_XX out of $GIT_DIR. It will not be the only command that
> > may write to $GIT_DIR. "git gc --auto" (which can be triggered at the
> > server side at push time) can write $GIT_DIR/gc.pid (and soon,
> > gc.log). Even if you disable gc --auto and run it periodically (with
> > cron or something), it will write gc.pid.
> > 
> > Is it really necessary to remove write access in $GIT_DIR? Do we (git
> > devs) have some guidelines about things in $GIT_DIR?
> 
> IMO it makes little sense to remove write access from users who you want to 
> push.
> 
> They need to write objects to the directory, after all, and update refs.
> 
> This problem sounds more like the doing of an overzealous sysadmin to me than 
> a careful one who researched
> diligently what locations require write access for the intended operations.

We did and it all worked just fine , uses can push as they should. It is just 
shallow clones
that are non working. Why are pushes against normal clones and shallow clones 
not handled the
same way w.r.t tmp file creation?

> 
> Personally, I see little sense in bending over to try to support such an 
> intentionally tampered setup.

Before bringing out your shootgun, make sure you are aiming it the right target.

 Jocke
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Unable to create temporary file '/var/git/tmv3-target-overlay.git/shallow_Un8ZOR': Permission denied

2015-09-19 Thread Joakim Tjernlund
On Sat, 2015-09-19 at 09:21 +0700, Duy Nguyen wrote:
> On Thu, Sep 17, 2015 at 11:54 PM, Joakim Tjernlund
> <joakim.tjernl...@transmode.se> wrote:
> > On Thu, 2015-09-17 at 20:18 +0700, Duy Nguyen wrote:
> > > On Mon, Sep 14, 2015 at 10:37 PM, Joakim Tjernlund
> > > <joakim.tjernl...@transmode.se> wrote:
> > > > On Mon, 2015-08-31 at 16:56 +0700, Duy Nguyen wrote:
> > > > > On Fri, Aug 21, 2015 at 6:36 PM, Joakim Tjernlund
> > > > > <joakim.tjernl...@transmode.se> wrote:
> > > > > > I cannot push:
> > > > > > # > git push origin
> > > > > > Login for jo...@git.transmode.se
> > > > > > Password:
> > > > > > Counting objects: 7, done.
> > > > > > Delta compression using up to 4 threads.
> > > > > > Compressing objects: 100% (7/7), done.
> > > > > > Writing objects: 100% (7/7), 13.73 KiB | 0 bytes/s, done.
> > > > > > Total 7 (delta 4), reused 0 (delta 0)
> > > > > > fatal: Unable to create temporary file 
> > > > > > '/var/git/tmv3-target-overlay.git/shallow_Un8ZOR':
> > > > > > Permission
> > > > > > denied
> 
> I'm about to do it, but now I'm not sure if I should move
> shallow_XX out of $GIT_DIR. It will not be the only command that
> may write to $GIT_DIR. "git gc --auto" (which can be triggered at the
> server side at push time) can write $GIT_DIR/gc.pid (and soon,
> gc.log). Even if you disable gc --auto and run it periodically (with
> cron or something), it will write gc.pid.
> 
> Is it really necessary to remove write access in $GIT_DIR? Do we (git
> devs) have some guidelines about things in $GIT_DIR?

It feels a lot cleaner to not let everybody create stuff in $GIT_DIR
we have:
# > ls -l
total 24
dr-xr-sr-x   6 apache tm-3000  123 Jun 10 15:30 ./
drwxr-xr-x  36 root   root4096 Jun 25 11:11 ../
-r--r--r--   1 root   tm-3000  263 Jun 10 15:28 config
-r--r--r--   1 apache tm-3000   73 Jun 10 15:28 description
-rw-r--r--   1 root   tm-30000 Jun 10 15:30 git-daemon-export-ok
-r--r--r--   1 apache tm-3000   23 Jun 10 15:28 HEAD
drwxr-sr-x   2 root   tm-3000 4096 Jun 10 15:28 hooks/
drwxrwsr-x   2 apache tm-3000   20 Jun 10 15:28 info/
drwxrwsr-x 157 apache tm-3000 4096 Jul 14 15:06 objects/
drwxrwsr-x   4 apache tm-3000   29 Jun 10 15:28 refs/

Why mess this up with tmp files? Would be cleaner to have a specific tmp dir in 
$GIT_DIR for that.

 Jocke--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Unable to create temporary file '/var/git/tmv3-target-overlay.git/shallow_Un8ZOR': Permission denied

2015-09-17 Thread Joakim Tjernlund
On Thu, 2015-09-17 at 20:18 +0700, Duy Nguyen wrote:
> On Mon, Sep 14, 2015 at 10:37 PM, Joakim Tjernlund
> <joakim.tjernl...@transmode.se> wrote:
> > On Mon, 2015-08-31 at 16:56 +0700, Duy Nguyen wrote:
> > > On Fri, Aug 21, 2015 at 6:36 PM, Joakim Tjernlund
> > > <joakim.tjernl...@transmode.se> wrote:
> > > > I cannot push:
> > > > # > git push origin
> > > > Login for jo...@git.transmode.se
> > > > Password:
> > > > Counting objects: 7, done.
> > > > Delta compression using up to 4 threads.
> > > > Compressing objects: 100% (7/7), done.
> > > > Writing objects: 100% (7/7), 13.73 KiB | 0 bytes/s, done.
> > > > Total 7 (delta 4), reused 0 (delta 0)
> > > > fatal: Unable to create temporary file 
> > > > '/var/git/tmv3-target-overlay.git/shallow_Un8ZOR': Permission
> > > > denied
> > > > fatal: The remote end hung up unexpectedly
> > > > fatal: The remote end hung up unexpectedly
> > > 
> > > Noted. Will try to fix (but probably not fast). At first I thought
> > > this was an old bug, but that old bug [1] is in the fetch/clone path,
> > > not push. Not sure if the same approach can be reused here (i.e.avoid
> > > temp files altoghether).
> > > 
> > > [1] b790e0f (upload-pack: send shallow info over stdin to pack-objects
> > > - 2014-03-11)
> > 
> > Noticed I had forgotten to reply ...
> > 
> > An even simpler fix would be to have an tmp dir within the repo, aka:
> >  /var/git/tmv3-target-overlay.git/tmp/shallow_Un8ZOR
> > This would cover all cases when one must create a tmp file
> 
> Sorry for my silence. I intend to put these temp files in $TMPDIR by
> resurrecting (part of) this patch [1]. Maybe tomorrow.
> 
> But if you build your own, you can put them in $GIT_DIR/tmp by
> replacing "shallow_XX" in setup_temporary_shallow() in shallow.c
> with "tmp/shallow_". You need to create the directory "tmp" in
> advance though, or do
> "safe_create_leading_directories_const(git_path("tmp/shallow_X"));"
> before xmkstemp()

I think you should do both, 
safe_create_leading_directories_const(git_path("tmp/shallow_X")) and
TMPDIR.

Anyhow, can you send me a patch when you are done?

  Jocke
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Unable to create temporary file '/var/git/tmv3-target-overlay.git/shallow_Un8ZOR': Permission denied

2015-09-14 Thread Joakim Tjernlund
On Mon, 2015-08-31 at 16:56 +0700, Duy Nguyen wrote:
> On Fri, Aug 21, 2015 at 6:36 PM, Joakim Tjernlund
> <joakim.tjernl...@transmode.se> wrote:
> > I cannot push:
> > # > git push origin
> > Login for jo...@git.transmode.se
> > Password:
> > Counting objects: 7, done.
> > Delta compression using up to 4 threads.
> > Compressing objects: 100% (7/7), done.
> > Writing objects: 100% (7/7), 13.73 KiB | 0 bytes/s, done.
> > Total 7 (delta 4), reused 0 (delta 0)
> > fatal: Unable to create temporary file 
> > '/var/git/tmv3-target-overlay.git/shallow_Un8ZOR': Permission
> > denied
> > fatal: The remote end hung up unexpectedly
> > fatal: The remote end hung up unexpectedly
> 
> Noted. Will try to fix (but probably not fast). At first I thought
> this was an old bug, but that old bug [1] is in the fetch/clone path,
> not push. Not sure if the same approach can be reused here (i.e.avoid
> temp files altoghether).
> 
> [1] b790e0f (upload-pack: send shallow info over stdin to pack-objects
> - 2014-03-11)

Noticed I had forgotten to reply ...

An even simpler fix would be to have an tmp dir within the repo, aka:
 /var/git/tmv3-target-overlay.git/tmp/shallow_Un8ZOR
This would cover all cases when one must create a tmp file

 Jocke--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Unable to create temporary file '/var/git/tmv3-target-overlay.git/shallow_Un8ZOR': Permission denied

2015-08-31 Thread Joakim Tjernlund
On Fri, 2015-08-21 at 13:50 +0200, Joakim Tjernlund wrote:
> On Fri, 2015-08-21 at 13:36 +0200, Joakim Tjernlund wrote:
> > I cannot push:
> > # > git push origin
> > Login for jo...@git.transmode.se
> > Password: 
> > Counting objects: 7, done.
> > Delta compression using up to 4 threads.
> > Compressing objects: 100% (7/7), done.
> > Writing objects: 100% (7/7), 13.73 KiB | 0 bytes/s, done.
> > Total 7 (delta 4), reused 0 (delta 0)
> > fatal: Unable to create temporary file 
> > '/var/git/tmv3-target-overlay.git/shallow_Un8ZOR': Permission 
> > denied
> > fatal: The remote end hung up unexpectedly
> > fatal: The remote end hung up unexpectedly
> > cu-km022 tmv3-target-overlay # ls -l
> > total 0
> > drwxr-xr-x 1 root root  72 Aug 19 17:59 ./
> > drwxr-xr-x 1 root root  38 Aug 19 17:59 ../
> > drwxr-xr-x 1 root root 216 Aug 21 13:07 .git/
> > drwxr-xr-x 1 root root  22 Aug 19 17:59 metadata/
> > drwxr-xr-x 1 root root  58 Aug 19 18:27 profiles/
> > drwxr-xr-x 1 root root  74 Aug 19 17:59 sys-apps/
> > drwxr-xr-x 1 root root  42 Aug 19 17:59 sys-libs/
> > 
> > On server I have:
> > # >ls -la
> > total 24
> > dr-xr-sr-x   6 apache tm-3000  123 Jun 10 15:25 .
> > drwxr-xr-x  36 root   root4096 Jun 25 11:11 ..
> > -r--r--r--   1 root   tm-3000  263 Jun 10 15:18 config
> > -r--r--r--   1 apache tm-3000   73 Jun 10 15:18 description
> > -rw-r--r--   1 root   tm-30000 Jun 10 15:25 git-daemon-export-ok
> > -r--r--r--   1 apache tm-3000   23 Jun 10 15:18 HEAD
> > drwxr-sr-x   2 root   tm-3000 4096 Jun 10 15:18 hooks
> > drwxrwsr-x   2 apache tm-3000   20 Jun 10 15:18 info
> > drwxrwsr-x 135 apache tm-3000 4096 Aug 20 19:07 objects
> > drwxrwsr-x   4 apache tm-3000   29 Jun 10 15:18 refs
> > 
> > 
> > I suspect this is because no one is allowed to write the repos top dir.
> > It would be much better if git allowed a tmp dir inside the repo and used 
> > that 
> > for push etc.
> > Meanwhile, is there some workaround I can use?
> 
> This error seems to only affect shallow clones.
> Forgot, git version 2.4.6

Ping?

 Jocke
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Unable to create temporary file '/var/git/tmv3-target-overlay.git/shallow_Un8ZOR': Permission denied

2015-08-21 Thread Joakim Tjernlund
I cannot push:
#  git push origin
Login for jo...@git.transmode.se
Password: 
Counting objects: 7, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (7/7), done.
Writing objects: 100% (7/7), 13.73 KiB | 0 bytes/s, done.
Total 7 (delta 4), reused 0 (delta 0)
fatal: Unable to create temporary file 
'/var/git/tmv3-target-overlay.git/shallow_Un8ZOR': Permission denied
fatal: The remote end hung up unexpectedly
fatal: The remote end hung up unexpectedly
cu-km022 tmv3-target-overlay # ls -l
total 0
drwxr-xr-x 1 root root  72 Aug 19 17:59 ./
drwxr-xr-x 1 root root  38 Aug 19 17:59 ../
drwxr-xr-x 1 root root 216 Aug 21 13:07 .git/
drwxr-xr-x 1 root root  22 Aug 19 17:59 metadata/
drwxr-xr-x 1 root root  58 Aug 19 18:27 profiles/
drwxr-xr-x 1 root root  74 Aug 19 17:59 sys-apps/
drwxr-xr-x 1 root root  42 Aug 19 17:59 sys-libs/

On server I have:
# ls -la
total 24
dr-xr-sr-x   6 apache tm-3000  123 Jun 10 15:25 .
drwxr-xr-x  36 root   root4096 Jun 25 11:11 ..
-r--r--r--   1 root   tm-3000  263 Jun 10 15:18 config
-r--r--r--   1 apache tm-3000   73 Jun 10 15:18 description
-rw-r--r--   1 root   tm-30000 Jun 10 15:25 git-daemon-export-ok
-r--r--r--   1 apache tm-3000   23 Jun 10 15:18 HEAD
drwxr-sr-x   2 root   tm-3000 4096 Jun 10 15:18 hooks
drwxrwsr-x   2 apache tm-3000   20 Jun 10 15:18 info
drwxrwsr-x 135 apache tm-3000 4096 Aug 20 19:07 objects
drwxrwsr-x   4 apache tm-3000   29 Jun 10 15:18 refs


I suspect this is because no one is allowed to write the repos top dir.
It would be much better if git allowed a tmp dir inside the repo and used that 
for push etc.
Meanwhile, is there some workaround I can use?

 Jocke--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Unable to create temporary file '/var/git/tmv3-target-overlay.git/shallow_Un8ZOR': Permission denied

2015-08-21 Thread Joakim Tjernlund
On Fri, 2015-08-21 at 13:36 +0200, Joakim Tjernlund wrote:
 I cannot push:
 #  git push origin
 Login for jo...@git.transmode.se
 Password: 
 Counting objects: 7, done.
 Delta compression using up to 4 threads.
 Compressing objects: 100% (7/7), done.
 Writing objects: 100% (7/7), 13.73 KiB | 0 bytes/s, done.
 Total 7 (delta 4), reused 0 (delta 0)
 fatal: Unable to create temporary file 
 '/var/git/tmv3-target-overlay.git/shallow_Un8ZOR': Permission denied
 fatal: The remote end hung up unexpectedly
 fatal: The remote end hung up unexpectedly
 cu-km022 tmv3-target-overlay # ls -l
 total 0
 drwxr-xr-x 1 root root  72 Aug 19 17:59 ./
 drwxr-xr-x 1 root root  38 Aug 19 17:59 ../
 drwxr-xr-x 1 root root 216 Aug 21 13:07 .git/
 drwxr-xr-x 1 root root  22 Aug 19 17:59 metadata/
 drwxr-xr-x 1 root root  58 Aug 19 18:27 profiles/
 drwxr-xr-x 1 root root  74 Aug 19 17:59 sys-apps/
 drwxr-xr-x 1 root root  42 Aug 19 17:59 sys-libs/
 
 On server I have:
 # ls -la
 total 24
 dr-xr-sr-x   6 apache tm-3000  123 Jun 10 15:25 .
 drwxr-xr-x  36 root   root4096 Jun 25 11:11 ..
 -r--r--r--   1 root   tm-3000  263 Jun 10 15:18 config
 -r--r--r--   1 apache tm-3000   73 Jun 10 15:18 description
 -rw-r--r--   1 root   tm-30000 Jun 10 15:25 git-daemon-export-ok
 -r--r--r--   1 apache tm-3000   23 Jun 10 15:18 HEAD
 drwxr-sr-x   2 root   tm-3000 4096 Jun 10 15:18 hooks
 drwxrwsr-x   2 apache tm-3000   20 Jun 10 15:18 info
 drwxrwsr-x 135 apache tm-3000 4096 Aug 20 19:07 objects
 drwxrwsr-x   4 apache tm-3000   29 Jun 10 15:18 refs
 
 
 I suspect this is because no one is allowed to write the repos top dir.
 It would be much better if git allowed a tmp dir inside the repo and used 
 that 
 for push etc.
 Meanwhile, is there some workaround I can use?

This error seems to only affect shallow clones.
Forgot, git version 2.4.6

 Jocke
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html