Configuring the default visibility of new repositories in your enterprise
Each time someone creates a new repository on your enterprise, that person must choose a visibility for the repository. When you configure a default visibility setting for the enterprise, you choose which visibility is selected by default. リポジトリの可視性に関する詳しい情報については、「リポジトリの可視性について」を参照してください。
If an enterprise owner disallows members from creating certain types of repositories, members will not be able to create that type of repository even if the visibility setting defaults to that type. For more information, see "Setting a policy for repository creation."
- Navigate to your enterprise account by visiting
https://HOSTNAME/enterprises/ENTERPRISE-NAME
, replacingHOSTNAME
with your instance's hostname andENTERPRISE-NAME
with your enterprise account's name.
-
Enterpriseアカウントのサイドバーで、 Settings(設定)をクリックしてください。
-
Under " Settings", click Options.
-
"Default repository visibility(デフォルトのリポジトリの可視性)"の下で、ドロップダウンメニューを使ってデフォルトの可視性を選択してください。
Warning: If you add an image attachment to a pull request or issue comment, anyone can view the anonymized image URL without authentication, even if the pull request is in a private repository, or if private mode is enabled. To prevent unauthorized access to the images, ensure that you restrict network access to the systems that serve the images, including your GitHub Enterprise Server instance.
リポジトリの可視性を変更するためのポリシーを設定する
When you prevent members from changing repository visibility, only enterprise owners can change the visibility of a repository.
If an enterprise owner has restricted repository creation to organization owners only, then members will not be able to change repository visibility. If an enterprise owner has restricted member repository creation to private repositories only, then members will only be able to change the visibility of a repository to private. For more information, see "Setting a policy for repository creation."
-
Navigate to your enterprise account by visiting
https://HOSTNAME/enterprises/ENTERPRISE-NAME
, replacingHOSTNAME
with your instance's hostname andENTERPRISE-NAME
with your enterprise account's name. -
Enterpriseアカウントのサイドバーで、 Policies(ポリシー)をクリックしてください。
-
" Policies(ポリシー)"の下で、Repositories(リポジトリ)をクリックしてください。
-
[Repository visibility change] で、設定変更についての情報を確認します。 あるいは、設定を強制する前にEnterpriseアカウント内のすべてのOrganizationの現在の設定を見たいなら、 View your organizations' current configurations(Organizationの現在の設定の表示)をクリックしてください。
-
"Repository visibility change(リポジトリの可視性の変更)"の下で、ドロップダウンメニューを使ってポリシーを選択してください。
リポジトリ作成のためのポリシーを設定する
Organizationのオーナーは、いつでも任意の種類のリポジトリを作成でき、外部のコラボレータはいかなる種類のリポジトリも作成できません。 詳細は「リポジトリの可視性について」を参照してください。
-
Navigate to your enterprise account by visiting
https://HOSTNAME/enterprises/ENTERPRISE-NAME
, replacingHOSTNAME
with your instance's hostname andENTERPRISE-NAME
with your enterprise account's name. -
Enterpriseアカウントのサイドバーで、 Policies(ポリシー)をクリックしてください。
-
" Policies(ポリシー)"の下で、Repositories(リポジトリ)をクリックしてください。
-
[Repository creation] で、設定変更に関する情報を読みます。 あるいは、設定を強制する前にEnterpriseアカウント内のすべてのOrganizationの現在の設定を見たいなら、 View your organizations' current configurations(Organizationの現在の設定の表示)をクリックしてください。
-
"Repository creation(リポジトリの作成)"の下で、ポリシーを選択してください。
-
Members can create repositories(メンバーはリポジトリを作成可能)を選択したなら、1つ以上のリポジトリの種類を選択してください。
プライベートまたは内部リポジトリのフォークに関するポリシーを施行する
Across all organizations owned by your enterprise, you can allow people with access to a private or internal repository to fork the repository, never allow forking of private or internal repositories, or allow owners to administer the setting on the organization level.
-
Navigate to your enterprise account by visiting
https://HOSTNAME/enterprises/ENTERPRISE-NAME
, replacingHOSTNAME
with your instance's hostname andENTERPRISE-NAME
with your enterprise account's name. -
Enterpriseアカウントのサイドバーで、 Policies(ポリシー)をクリックしてください。
-
[Repository policies] タブの [Repository forking] で、設定変更についての情報を読みます。 あるいは、設定を強制する前にEnterpriseアカウント内のすべてのOrganizationの現在の設定を見たいなら、 View your organizations' current configurations(Organizationの現在の設定の表示)をクリックしてください。
-
[Repository forking] で、ドロップダウンメニューを使用してポリシーを選択します。
リポジトリの削除と移譲のためのポリシーを設定する
-
Navigate to your enterprise account by visiting
https://HOSTNAME/enterprises/ENTERPRISE-NAME
, replacingHOSTNAME
with your instance's hostname andENTERPRISE-NAME
with your enterprise account's name. -
Enterpriseアカウントのサイドバーで、 Policies(ポリシー)をクリックしてください。
-
" Policies(ポリシー)"の下で、Repositories(リポジトリ)をクリックしてください。
-
「Repository deletion and transfer」で、設定変更に関する情報を確認します。 あるいは、設定を強制する前にEnterpriseアカウント内のすべてのOrganizationの現在の設定を見たいなら、 View your organizations' current configurations(Organizationの現在の設定の表示)をクリックしてください。
-
"Repository deletion and transfer(リポジトリの削除と移譲)"の下で、ドロップダウンメニューを使ってポリシーを選択してください。
Git プッシュ制限のためのポリシーを設定する
To keep your repository size manageable and prevent performance issues, you can configure a file size limit for repositories in your enterprise.
デフォルトでは、リポジトリのアップロード制限を適用すると、100MB以上のファイルの追加やアップロードができなくなります。
- Navigate to your enterprise account by visiting
https://HOSTNAME/enterprises/ENTERPRISE-NAME
, replacingHOSTNAME
with your instance's hostname andENTERPRISE-NAME
with your enterprise account's name.
-
Enterpriseアカウントのサイドバーで、 Settings(設定)をクリックしてください。
-
Under " Settings", click Options.
-
[Repository upload limit] で、ドロップダウンメニューを使用して最大オブジェクトサイズをクリックします。
-
Optionally, to enforce a maximum upload limit for all repositories in your enterprise, select Enforce on all repositories
リポジトリ間のプルリクエストのためのマージコンフリクトエディタを設定する
ユーザが自分のコンピュータ上でローカルにマージコンフリクトを解決するように要求すれば、うっかりフォークから上流のリポジトリに書き込んでしまうことを回避できます。
- Navigate to your enterprise account by visiting
https://HOSTNAME/enterprises/ENTERPRISE-NAME
, replacingHOSTNAME
with your instance's hostname andENTERPRISE-NAME
with your enterprise account's name.
-
Enterpriseアカウントのサイドバーで、 Settings(設定)をクリックしてください。
-
Under " Settings", click Options.
-
"Conflict editor for pull requests between repositories(リポジトリ間のプルリクエストのコンフリクトエディタ)"の下でドロップダウンメニューを使い、Disabled(無効化)を選択してください。
フォースプッシュを設定する
それぞれのリポジトリは、所属するユーザアカウントもしくはOraganizationの設定から、デフォルトのフォースプッシュの設定を引き継ぎます。 Likewise, 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, it will change for all repositories owned by any user or organization.
アプライアンス上でのすべてのフォースプッシュをブロックする
- Navigate to your enterprise account by visiting
https://HOSTNAME/enterprises/ENTERPRISE-NAME
, replacingHOSTNAME
with your instance's hostname andENTERPRISE-NAME
with your enterprise account's name.
-
Enterpriseアカウントのサイドバーで、 Settings(設定)をクリックしてください。
-
Under " Settings", click Options.
-
[Force pushes] の下のドロップダウンメニューから、[Allow]、[Block]、[Block to the default branch] のいずれかをクリックしてください。
-
[Enforce on all repositories(すべてのリポジトリに強制)] を選択して、フォースプッシュに関する Organization およびリポジトリレベルの設定をオーバーライドすることもできます。
特定のリポジトリへのフォースプッシュをブロックする
ノート: 各リポジトリは、そのリポジトリを所有するOrganizationもしくはユーザのデフォルト設定を自動的に継承します。 リポジトリのオーナーが、所有するすべてのリポジトリに対して設定を強制している場合、デフォルト設定は上書きできません。
http(s)://HOSTNAME/login
でyour GitHub Enterprise Server instanceにサインインしてください。- From an administrative account on GitHub Enterprise Server, click in the upper-right corner of any page.
- 検索フィールドでリポジトリ名を入力し、Search(検索)をクリックしてください。
- 検索結果で、リポジトリ名をクリックしてください。
- In the upper-right corner of the page, click Admin.
- 左のサイドバーで Admn(管理)をクリックしてください。
- [Push and Pull] の下で [Block] または [Block to the default branch] を選択してください。
ユーザアカウントもしくはOrganizationが所有するリポジトリへのフォースプッシュのブロック
リポジトリは、所属するユーザアカウントもしくはOrganizationからフォースプッシュの設定を引き継ぎます。 User accounts and organizations in turn inherit their force push settings from the force push settings for the enterprise.
引き継がれたデフォルトの設定は、ユーザアカウントもしくはOrganizationの設定をすることで上書きできます。
http(s)://HOSTNAME/login
でyour GitHub Enterprise Server instanceにサインインしてください。- From an administrative account on GitHub Enterprise Server, click in the upper-right corner of any page.
- 検索フィールドでユーザもしくはOrganizationの名前を入力し、Search(検索)をクリックしてください。
- 検索結果で、ユーザもしくはOrganizationの名前をクリックしてください。
- In the upper-right corner of the page, click Admin.
- 左のサイドバーで Admn(管理)をクリックしてください。
- [Repository default settings(リポジトリのデフォルト設定)] の下の [Force pushes(フォースプッシュ)] セクションで、以下から選択してください。
- [Block(ブロック)] ですべてのブランチへのフォースプッシュがブロックされます。
- [Block to the default branch(デフォルトブランチへのブロック)] でデフォルトブランチへのフォースプッシュのみがブロックされます。
- Enforce on all repositories(すべてのリポジトリに対して強制)を選択して、リポジトリ固有の設定を上書きすることもできます。 Note that this will not override an enterprise-wide policy.
匿名 Git 読み取りアクセスを設定する
ノート: 匿名Gitアクセスを有効にする場合、この機能のすべてのアクセスと利用に責任を負うことになります。 GitHubは、この機能のあらゆる意図しないアクセスや悪用に対して責任を負いません。 また、弊社から購入したユーザライセンス数の制限を含むGitHubのライセンスに違反するためにこの機能を使うことはできません。
If you have enabled private mode on your enterprise, you can allow repository administrators to enable anonymous Git read access to public repositories.
Enabling anonymous Git read access allows users to bypass authentication for custom tools on your enterprise. あなたもしくはリポジトリ管理者がこのアクセス設定をリポジトリで有効化すると、認証を受けていない Git の操作 (そして GitHub Enterprise Server へのネットワークアクセスができる人はだれでも) は、認証なしでリポジトリに読み取りアクセスできることになります。
If necessary, you can prevent repository administrators from changing anonymous Git access settings for repositories on your enterprise by locking the repository's access settings. リポジトリのGit読み取りアクセス設定をロックすると、サイト管理者だけがこの設定を変更できるようになります。
匿名 Git 読み取りアクセスが有効になっているリポジトリを見るには、サイト管理ダッシュボードでリポジトリのリストをフィルタリングしてください。
ノート:
- フォークされたリポジトリのGitの読み取りアクセスは変更できません。これは、それらがデフォルトでルートリポジトリからアクセス設定を引き継ぐためです。
- パブリックなリポジトリがプライベートになると、そのリポジトリ及びそのフォークでは匿名Git読み取りアクセスが自動的に無効化されます。
- 匿名認証を持つリポジトリにGit LFSアセットが含まれている場合でも、Git LFSのダウンロードには認証が必要なのでダウンロードは失敗します。 Git LFSアセットを含むリポジトリには、匿名Git読み取りアクセスを有効化しないよう強くおすすめします。
すべてのリポジトリに対する匿名 Git 読み取りアクセスを設定する
- Navigate to your enterprise account by visiting
https://HOSTNAME/enterprises/ENTERPRISE-NAME
, replacingHOSTNAME
with your instance's hostname andENTERPRISE-NAME
with your enterprise account's name.
-
Enterpriseアカウントのサイドバーで、 Settings(設定)をクリックしてください。
-
Under " Settings", click Options.
-
[Anonymous Git read access(匿名 Git 読み取りアクセス)] の下で、ドロップダウンメニューを使って [Enabled(有効化)] をクリックしてください。
-
Optionally, to prevent repository admins from changing anonymous Git read access settings in all repositories on your enterprise, select Prevent repository admins from changing anonymous Git read access.
特定のリポジトリでの匿名 Git 読み取りアクセスを設定する
- From an administrative account on GitHub Enterprise Server, click in the upper-right corner of any page.
- 検索フィールドでリポジトリ名を入力し、Search(検索)をクリックしてください。
- 検索結果で、リポジトリ名をクリックしてください。
- In the upper-right corner of the page, click Admin.
- 左のサイドバーで Admn(管理)をクリックしてください。
- "Danger Zone(危険区域)"の下で、"Enable Anonymous Git read access(匿名Git読み取りアクセスの有効化)"の隣のEnable(有効化)をクリックしてください。
- 変更を確認します。 確定するには、[Yes, enable anonymous Git read access] をクリックします。
- このリポジトリの設定をリポジトリ管理者が変更するのを避けるために、[Prevent repository admins from changing anonymous Git read access(リポジトリ管理者による匿名Git読み取りアクセスの変更の回避)] を選択することもできます。