1

We have around 100 devs working on different project, usually in teams of 2-3 devs, and a project lasts for around 1 week max, we have a local gitlab setup, through which version control is taken care off. We also revoke the privileges on a project once its over, so they couldn't make any amends without the knowledge of a senior; Is it possible to make sure that the local git mapped folder gets deleted if the privileges are revoked and the user tries to do a git pull. The developers have a mix of windows, linux and mac machines, so I don't think its possible to have a daemon script which deletes the folders for which privileges are revoked. One more idea I have is to keep the entire data on the NAS and delete the directories at NAS if the git privileges are revoked or the manager identifies and closes a project for further development.

Brij Raj Singh - MSFT
  • 4,903
  • 7
  • 36
  • 55
  • 1
    It's unclear why you want to do this. If it's to prevent your developers from looking at projects they worked on previously, then it's not going to work because they can always save another copy somewhere else. If you want to prevent developers from doing any more work, then you want to prevent them from doing a *push*, not from doing a pull. A pull doesn't ever change anything in the upstream repository. – Greg Hewgill Sep 24 '13 at 05:51
  • @GregHewgill yes, We want to stop developers to be able to look at projects or even have a copy of it on their machines when the project is over. As for saving another copy is concerned, that's why I have been thinking about making them work only and only on a NAS disk, which we have under control. – Brij Raj Singh - MSFT Sep 24 '13 at 06:05
  • Well it sounds like you want some really tight central control. Have you looked at ClearCase? – Greg Hewgill Sep 24 '13 at 06:08
  • no I haven't heard of clear case, but Let me take a look if it fits the bill and requirements. – Brij Raj Singh - MSFT Sep 24 '13 at 06:10
  • @GregHewgill you are so mean today ;) – VonC Sep 24 '13 at 07:16
  • 1
    @BrijRajSingh don't bother with ClearCase, that would really be a curse to impose such a tool on your developers. Even though, yes, you could unregister snapshot or dynamic view remotely, preventing a developer to work. But you cannot delete a ClearCase snapshot view remotely, so he/she would still have a copy. See http://stackoverflow.com/a/2925378/6309. – VonC Sep 24 '13 at 07:18

1 Answers1

2

Is it possible to make sure that the local git mapped folder gets deleted if the privileges are revoked and the user tries to do a git pull.

If the privileges are revoked on the central GitLab instance, the developer won't be able to to a git pull (or git push).

But you cannot control/enforce what is happening locally. Only centrally on the GitLab side.

In a decentralized environment (which is what git allows you to manage, as a Distributed VCS), you can control how the downstream repos interact with you (through Access Control Level, with gitolite or gitlab-shell), but you cannot access directly the downstream environments themselves.

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • hm, you're either missing a "not" in your first sentence or your contradicting yourself -- or you're just really unclear here :D – Nevik Rehnel Sep 24 '13 at 05:54
  • @NevikRehnel I forgot the '>': the first sentence is a copy of what the OP was asking. My answer follows *after* that first sentence – VonC Sep 24 '13 at 05:57
  • @VonC I am aware that Git won't allow a git pull or push if the privileges are revoked, what I would like to do by either means is that developer shouldn't be able to work on that project or even have a local copy of it once the project is over. – Brij Raj Singh - MSFT Sep 24 '13 at 06:06
  • 1
    @BrijRajSingh my answer stands. Not possible through git or gitlab directly. – VonC Sep 24 '13 at 07:15