Open-source Languages & Tools for z/OS

 View Only
  • 1.  How to allow shared access to a Git repository on USS?

    Posted 02-01-2018 16:49

    Hello! I’m looking for a way to create a Git repository on USS whose files are accessible in every way to all members of the group. I’ve tried setting chmod 775 and +s on the git directory and configuring the repository to have core.sharedrepository=group. However, at various points in Git processing (create a branch, push), we keep seeing file permissions errors.

    Is there a way to tell USS just to let everyone in the group do anything they like to any of the files in the directory? I’m thinking of something like members in a PDS that’s set up with RACF ALTER access.

    Thanks,
    Tony



  • 2.  RE: How to allow shared access to a Git repository on USS?

    Posted 02-02-2018 17:09

    I’m not entirely sure what you are trying to do; I think there are two possibilities:

    • You are trying to have several people share the same git repository as their local sandbox. I don’t think this is what you are trying to do.
    • You are trying to have several people use the same bare local repository as the target for pulls and pushes. I think this is what you are trying to do. Is that correct?

    If it is, in fact, the latter:

    • Is the shared repo a --bare repo? It must be.
    • What is umask set to for each user? I typically set mine to 022, which means that files I create will not be group-writable by default. You might have to set umask to 002, which could have other undesirable side effects.

    I’m definitely not a guru for either RACF or this particular use of local git repos, so beyond this, I can’t help. Anyone else?



  • 3.  RE: How to allow shared access to a Git repository on USS?

    Posted 02-02-2018 18:25

    I actually just ran across the umask 002 solution independently. The repository isn’t --bare – I’ll have to look into that – but with the umask, a not-me person was able to both push and pull, and I was able to do a merge with the files he pushed. That’s a measure of success, even if it’s not yet the best solution.

    Thanks, Jerry.



  • 4.  RE: How to allow shared access to a Git repository on USS?

    Posted 02-05-2018 17:10

    Hi Tony,

    You have to create bare repository (git init --bare). It is a “main” repository. Then each user should make his own copy of the repository (git clone). And each user should work only in his own copy. It is how git should be used. You don’t need any access settings.

    Thanks, Tatyana



  • 5.  RE: How to allow shared access to a Git repository on USS?

    Posted 02-05-2018 17:39

    Hi, Tatyana. I’m pretty sure that what Tony is trying to do is the second case I described in my response, which is what you are also talking about: a shared, but local, “bare” repository, with other local clones that will push and pull that shared repo.

    There actually ARE permission issues in this situation; the users who clone the bare repo will not be able to push to it unless the permissions are correct – which I think means:

    • all the users must have to have access to the group that owns the bare repo
    • the group owner for all the files and directories muse be that common group
    • the directories probably all have to have the setgid flag set (I don’t know if git does this itself, or of it has to be done manually)

    It might also be the case that each user will have to set their umask to 002 (instead of the more common 022).

    Maybe Tony will be kind enough to post a summary of what he had to do, once he has it all working.

    – Jerry



  • 6.  RE: How to allow shared access to a Git repository on USS?

    Posted 02-11-2018 15:23

    I’m working on a solution. I’ll post it when it’s done. Thanks.