It was easy on bitbucket. if I dont want my repo to be forked. I can disable it. Only people I have invite can work on repo as long as they have permission on repo.
Github has this functionality now. See Github's howto -- note that (as requested by OP) this is only available for private repos
To access this setting you must be signed in as an organization owner or as a repo admin. Navigate to your repo > Settings > Options and uncheck "Allow forking"