8

I'm trying to figure a way to prevent clone from github repository, for example, I have a private repository and some people working in that, in a company computer, each one in your team and authorization levels setted up.

When I set authorization for some user on github, the repository is avaiable on his/her own github account, to see and do what want since is authorized from anywhere.

How can I avoid someone to clone the repository on your own computer? Try to figure out someone is planning to get out the company for some reason, but before that hi/she clone the company repositories to use somewhere else. Since he/she will be unable to make changes on remote after I remove permission, avoiding clone will solve my security concerns.

peterh
  • 11,875
  • 18
  • 85
  • 108
kaahxd
  • 146
  • 1
  • 2
  • 8
  • 3
    You are solving this problem in entirely the wrong place; it's **not** a technical problem. You can't stop people cloning repos they have access to, that wouldn't make sense! – jonrsharpe Nov 06 '15 at 19:13
  • 2
    Note that you can have private repositories on Github that can do that, it's a paid option though – blackbird Nov 06 '15 at 19:19
  • So, do you want to allow access to the repository when they login from workplace, but not their own computers. Can using a dedicated account for work do what you want? – max630 Nov 08 '15 at 11:21
  • 2
    I'm not sure I understood correctly, cloning is essential step of git usage, how do you suppose they do anything without cloning? – max630 Nov 08 '15 at 11:25
  • @max630 Create an account just for work is an work arround, but I was looking for a sofisticated solution to avoid clone repository on personal computer and get access to the code just inside company. – kaahxd Nov 09 '15 at 11:40
  • I think this is a very valid question, especially for someone who owns a company/department. Ideally @kaahxd wants to have some kind of setup which would help the employees to clone the project only at the authorized place. Example, an employee who has git access can clone the repo in his/her private computer aswell. Though that might not look sensable in the Git industry, its a real pain point, exactly addressing why the employer gets an NDA and related paperwork signed. – Harry Mar 16 '23 at 10:24

1 Answers1

3

You can't.

You can't configure githubs git server on this way. More exactly, it is an automatized feature of the github, which can be triggered only by an incoming transaction. Not git transaction, but financial transaction. :-)

peterh
  • 11,875
  • 18
  • 85
  • 108