About policies for repository management in your enterprise
You can enforce policies to control how members of your enterprise on GitHub AE manage repositories. You can also allow organization owners to manage policies for repository management. For more information, see "Creating and managing repositories and "Organizations and teams."
Configuring the default visibility of new repositories
Each time someone creates a new repository within your enterprise, that person must choose a visibility for the repository. その Enterprise のデフォルトの可視性の設定をする際には、デフォルトで選択される可視性を選択します。 リポジトリの可視性に関する詳しい情報については「リポジトリについて」を参照してください。
Enterprise オーナーがメンバーによる特定のタイプのリポジトリの作成を禁止している場合、可視性設定がデフォルトでそのタイプに設定されていても、メンバーはそのタイプのリポジトリを作成できません。 詳しい情報については、「リポジトリ作成のためのポリシーを設定する」を参照してください。
-
GitHub AEの右上で、プロフィール写真をクリックし、続いてEnterprise settings(Enterpriseの設定)をクリックしてください。
-
Enterpriseアカウントのサイドバーで、 Policies(ポリシー)をクリックしてください。
-
Policies(ポリシー)の下で、Options(オプション)をクリックしてください。
-
"Default repository visibility(デフォルトのリポジトリの可視性)"の下で、ドロップダウンメニューを使ってデフォルトの可視性を選択してください。
警告: Pull RequestやIssueのコメントに画像を添付した場合、その匿名の画像URLは認証なしに誰でも見ることができます。GitHub AE上の画像URLへの認証なしのアクセスを避けるには、企業へのネットワークトラフィックを制限することを検討してください。 詳しい情報については「企業へのネットワークトラフィックの制限」を参照してください。
Enforcing a policy for base repository permissions
Across all organizations owned by your enterprise, you can set a base repository permission level (none, read, write, or admin) for organization members, or allow owners to administer the setting on the organization level.
-
GitHub AEの右上で、プロフィール写真をクリックし、続いてEnterprise settings(Enterpriseの設定)をクリックしてください。
-
Enterpriseアカウントのサイドバーで、 Policies(ポリシー)をクリックしてください。
-
" Policies(ポリシー)"の下で、Repositories(リポジトリ)をクリックしてください。
-
Under "Base permissions", review the information about changing the setting. Optionally, to view the current configuration for all organizations in the enterprise account before you change the setting, click View your organizations' current configurations.
-
Under "Base permissions", use the drop-down menu and choose a policy.
Enforcing a policy for repository creation
Across all organizations owned by your enterprise, you can allow members to create repositories, restrict repository creation to organization owners, or allow owners to administer the setting on the organization level. メンバーにリポジトリの作成を許可する場合は、パブリック、プライベート、内部の各リポジトリをどう組み合わせて作成するかを任意に選択できます。 詳しい情報については「内部リポジトリを作成する」を参照してください。
Organizationのオーナーは、いつでも任意の種類のリポジトリを作成でき、外部のコラボレータはいかなる種類のリポジトリも作成できません。 For more information, see "About repositories."
-
GitHub AEの右上で、プロフィール写真をクリックし、続いてEnterprise settings(Enterpriseの設定)をクリックしてください。
-
Enterpriseアカウントのサイドバーで、 Policies(ポリシー)をクリックしてください。
-
" Policies(ポリシー)"の下で、Repositories(リポジトリ)をクリックしてください。
-
[Repository creation] で、設定変更に関する情報を読みます。 Optionally, to view the current configuration for all organizations in the enterprise account before you change the setting, click View your organizations' current configurations.
-
"Repository creation(リポジトリの作成)"の下で、ポリシーを選択してください。
-
Members can create repositories(メンバーはリポジトリを作成可能)を選択したなら、1つ以上のリポジトリの種類を選択してください。
Enforcing a policy for forking private or internal repositories
Enterprise が所有しているすべての Organization 全体で、ユーザーにリポジトリのフォーク用にプライベートまたは内部リポジトリへのアクセスを許可したり、プライベートまたは内部リポジトリのフォークを一切禁止したり、オーナーが Organization レベルで設定を管理できるようにしたりすることができます。
-
GitHub AEの右上で、プロフィール写真をクリックし、続いてEnterprise settings(Enterpriseの設定)をクリックしてください。
-
Enterpriseアカウントのサイドバーで、 Policies(ポリシー)をクリックしてください。
-
" Policies(ポリシー)"の下で、Repositories(リポジトリ)をクリックしてください。
-
Under "Repository forking", review the information about changing the setting. Optionally, to view the current configuration for all organizations in the enterprise account before you change the setting, click View your organizations' current configurations.
-
[Repository forking] で、ドロップダウンメニューを使用してポリシーを選択します。
Enforcing a policy for inviting collaborators to repositories
Across all organizations owned by your enterprise, you can allow members to invite collaborators to repositories, restrict invitations to organization owners, or allow organization owners to administer the setting on the organization level.
-
GitHub AEの右上で、プロフィール写真をクリックし、続いてEnterprise settings(Enterpriseの設定)をクリックしてください。
-
Enterpriseアカウントのサイドバーで、 Policies(ポリシー)をクリックしてください。
-
" Policies(ポリシー)"の下で、Repositories(リポジトリ)をクリックしてください。
-
Under "Repository invitations", review the information about changing the setting. Optionally, to view the current configuration for all organizations in the enterprise account before you change the setting, click View your organizations' current configurations.
-
Under "Repository invitations", use the drop-down menu and choose a policy.
Enforcing a policy for the default branch name
Across all organizations owned by your enterprise, you can set the default branch name for any new repositories that members create. すべての Organization 全体でそのデフォルトブランチ名を施行することも、Organization ごとに異なる名前を設定することもできます。
-
GitHub AEの右上で、プロフィール写真をクリックし、続いてEnterprise settings(Enterpriseの設定)をクリックしてください。
-
Enterpriseアカウントのサイドバーで、 Policies(ポリシー)をクリックしてください。
-
[Repository policies] タブの [Default branch name] で、新しいリポジトリに使用するデフォルトブランチ名を入力します。
-
オプションで、Enterprise のすべての Organization に対してデフォルトブランチ名を施行する場合は [Enforce across this enterprise] を選択します。
-
[Update] をクリックします。
Enforcing a policy for changes to repository visibility
Across all organizations owned by your enterprise, you can allow members with admin access to change a repository's visibility, restrict repository visibility changes to organization owners, or allow owners to administer the setting on the organization level. メンバーがリポジトリの可視性を変更できないようにした場合、Enterprise のオーナーのみがリポジトリの可視性を変更できます。
Enterprise のオーナーがリポジトリの作成を Organization のオーナーのみに制限している場合、メンバーはリポジトリの可視性を変更できません。 Enterprise のオーナーがメンバーリポジトリの作成をプライベートリポジトリのみに制限している場合、メンバーはリポジトリの可視性をプライベートにのみ変更できます。 詳しい情報については、「リポジトリ作成のためのポリシーを設定する」を参照してください。
-
GitHub AEの右上で、プロフィール写真をクリックし、続いてEnterprise settings(Enterpriseの設定)をクリックしてください。
-
Enterpriseアカウントのサイドバーで、 Policies(ポリシー)をクリックしてください。
-
" Policies(ポリシー)"の下で、Repositories(リポジトリ)をクリックしてください。
-
[Repository visibility change] で、設定変更についての情報を確認します。 Optionally, to view the current configuration for all organizations in the enterprise account before you change the setting, click View your organizations' current configurations.
-
"Repository visibility change(リポジトリの可視性の変更)"の下で、ドロップダウンメニューを使ってポリシーを選択してください。
Enforcing a policy for repository deletion and transfer
Across all organizations owned by your enterprise, you can allow members with admin permissions to delete or transfer a repository, restrict repository deletion and transfers to organization owners, or allow owners to administer the setting on the organization level.
-
GitHub AEの右上で、プロフィール写真をクリックし、続いてEnterprise settings(Enterpriseの設定)をクリックしてください。
-
Enterpriseアカウントのサイドバーで、 Policies(ポリシー)をクリックしてください。
-
" Policies(ポリシー)"の下で、Repositories(リポジトリ)をクリックしてください。
-
「Repository deletion and transfer」で、設定変更に関する情報を確認します。 Optionally, to view the current configuration for all organizations in the enterprise account before you change the setting, click View your organizations' current configurations.
-
"Repository deletion and transfer(リポジトリの削除と移譲)"の下で、ドロップダウンメニューを使ってポリシーを選択してください。
Enforcing a policy for deleting issues
Across all organizations owned by your enterprise, you can allow members with admin access to delete issues in a repository, restrict issue deletion to organization owners, or allow owners to administer the setting on the organization level.
-
GitHub AEの右上で、プロフィール写真をクリックし、続いてEnterprise settings(Enterpriseの設定)をクリックしてください。
-
Enterpriseアカウントのサイドバーで、 Policies(ポリシー)をクリックしてください。
-
[Repository policies] タブの [Repository issue deletion] で、設定変更についての情報を確認します。 Optionally, to view the current configuration for all organizations in the enterprise account before you change the setting, click View your organizations' current configurations.
-
[Repository issue deletion] で、ドロップダウンメニューを使用してポリシーを選択します。
Enforcing a policy for Git push limits
リポジトリのサイズを管理しやすくして、パフォーマンスの問題を防ぐために、Enterprise 内のリポジトリのファイルサイズ制限を設定できます。
デフォルトでは、リポジトリのアップロード制限を適用すると、100MB以上のファイルの追加やアップロードができなくなります。
-
GitHub AEの右上で、プロフィール写真をクリックし、続いてEnterprise settings(Enterpriseの設定)をクリックしてください。
-
Enterpriseアカウントのサイドバーで、 Policies(ポリシー)をクリックしてください。
-
Policies(ポリシー)の下で、Options(オプション)をクリックしてください。
-
[Repository upload limit] で、ドロップダウンメニューを使用して最大オブジェクトサイズをクリックします。
-
必要に応じて、すべてのリポジトリにアップロードの最大制限を適用するには [Enforce on all repositories] を選択します。
リポジトリ間のプルリクエストのためのマージコンフリクトエディタを設定する
ユーザが自分のコンピュータ上でローカルにマージコンフリクトを解決するように要求すれば、うっかりフォークから上流のリポジトリに書き込んでしまうことを回避できます。
-
GitHub AEの右上で、プロフィール写真をクリックし、続いてEnterprise settings(Enterpriseの設定)をクリックしてください。
-
Enterpriseアカウントのサイドバーで、 Policies(ポリシー)をクリックしてください。
-
Policies(ポリシー)の下で、Options(オプション)をクリックしてください。
-
"Conflict editor for pull requests between repositories(リポジトリ間のプルリクエストのコンフリクトエディタ)"の下でドロップダウンメニューを使い、Disabled(無効化)を選択してください。
フォースプッシュを設定する
Each repository inherits a default force push setting from the settings of the user account or organization that owns the repository. Each organization and user account inherits a default force push setting from the force push setting for the enterprise. If you change the force push setting for the enterprise, the policy applies to all repositories owned by any user or organization.
Blocking force pushes to all repositories
-
GitHub AEの右上で、プロフィール写真をクリックし、続いてEnterprise settings(Enterpriseの設定)をクリックしてください。
-
Enterpriseアカウントのサイドバーで、 Policies(ポリシー)をクリックしてください。
-
Policies(ポリシー)の下で、Options(オプション)をクリックしてください。
-
[Force pushes] の下のドロップダウンメニューから、[Allow]、[Block]、[Block to the default branch] のいずれかをクリックしてください。
-
[Enforce on all repositories(すべてのリポジトリに強制)] を選択して、フォースプッシュに関する Organization およびリポジトリレベルの設定をオーバーライドすることもできます。
特定のリポジトリへのフォースプッシュをブロックする
ノート: 各リポジトリは、そのリポジトリを所有するOrganizationもしくはユーザのデフォルト設定を自動的に継承します。 リポジトリのオーナーが、所有するすべてのリポジトリに対して設定を強制している場合、デフォルト設定は上書きできません。
-
http(s)://HOSTNAME/login
でyour enterpriseにサインインしてください。 -
From an administrative account on GitHub AE, in the upper-right corner of any page, click .
-
If you're not already on the "Site admin" page, in the upper-left corner, click Site admin.
-
検索フィールドでリポジトリ名を入力し、Search(検索)をクリックしてください。
-
検索結果で、リポジトリ名をクリックしてください。
-
ページの右上から Admin(管理)をクリックしてください。
-
左のサイドバーで Admn(管理)をクリックしてください。
-
[Push and Pull] の下で [Block] または [Block to the default branch] を選択してください。
ユーザアカウントもしくはOrganizationが所有するリポジトリへのフォースプッシュのブロック
リポジトリは、所属するユーザアカウントもしくはOrganizationからフォースプッシュの設定を引き継ぎます。 そして、それぞれの Organization およびユーザアカウントは、フォースプッシュの設定を Enterprise のフォースプッシュの設定から引き継ぎます。
引き継がれたデフォルトの設定は、ユーザアカウントもしくはOrganizationの設定をすることで上書きできます。
-
http(s)://HOSTNAME/login
でyour enterpriseにサインインしてください。 -
From an administrative account on GitHub AE, in the upper-right corner of any page, click .
-
If you're not already on the "Site admin" page, in the upper-left corner, click Site admin.
-
検索フィールドでユーザもしくはOrganizationの名前を入力し、Search(検索)をクリックしてください。
-
検索結果で、ユーザもしくはOrganizationの名前をクリックしてください。
-
ページの右上から Admin(管理)をクリックしてください。
-
左のサイドバーで Admn(管理)をクリックしてください。
-
[Repository default settings(リポジトリのデフォルト設定)] の下の [Force pushes(フォースプッシュ)] セクションで、以下から選択してください。
- [Block(ブロック)] ですべてのブランチへのフォースプッシュがブロックされます。
- [Block to the default branch(デフォルトブランチへのブロック)] でデフォルトブランチへのフォースプッシュのみがブロックされます。
-
Enforce on all repositories(すべてのリポジトリに対して強制)を選択して、リポジトリ固有の設定を上書きすることもできます。 これは、Enterprise 全体のポリシーを上書きしませんのでご注意ください。