Limit Access of GitHub or Bitbucket Repository

2019-04-27 08:06发布

问题:

Is there any way to limit the access of bitbucket or Github repository from a specific IP Address.

Which means I want to access my organisation repositories only from my office.

The another this is that is there any way to block with a time being?

Any of the git providers supporting this feature?

The SSH key is only useful for the git action without entering passwords and username?

Any way to solve this issue?

I think many of the IT Companies are using this service for securing their source code.

Is it possible to achieve this without a git service?

回答1:

BitBucket does not appear to currently support access limitation by IP address:

We don't have any plans to add this feature in the short term, but it's a good idea. We'll leave this issue open as a feature request.

GitHub Enterprise does appear to support limiting access by IP address:

Whenever you add an SSH key to GitHub Enterprise via the Management Console, you can also specify which IP addresses to allow or deny connections from.

As to why BitBucket is in no rush to add this feature, we can look at the model upon which Git was built. One major feature of Git is that it allows for truly distributed development, across locations and IP addresses. A developer can contribute at home, in the office, or on the road, requiring only an internet connection. He can even continue making commits without an internet connection.



回答2:

Bitbucket added the new features in IP based access repository. IP based access to the repository in bitbucket, you need to purchase the premium version of bitbucket ($5/per user/month). By these, you can restrict the access to the repository by another network.