I want my Git repos to be setup only on particular desktops/laptops. Any good way to pursue that?
git does neither know something about authorization nor about authentication.
What you are trying is not possible with git.
BUT you can use some tools like gitolite to set up something similar based on ssh-keys. If your really want to restrict access also by IP you need something like a firewall on a server where the repo was intialy created.
Github's business model is that you can have public repos for free, but you need to have a payed subscription to have private repos.
Whitelisting IPs is not a good idea. The IP address of a typical home internet connection may change anytime the ISP wants it to change and enterprises will have many hundred or thousand users behind a single public IP. Both ways you will have problems allowing the proper user to a specific repo.
You might have a look at Git hosting services that offer private repos with authentication (free).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With